mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
device-manager: Add a sanity check for reading entries
There is code elsewhere that assumes that if user_set_description is true, then the description is non-NULL.
This commit is contained in:
parent
491c6a3a0b
commit
67132eea1a
1 changed files with 5 additions and 0 deletions
|
|
@ -304,6 +304,11 @@ static struct entry* entry_read(struct userdata *u, const char *name) {
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (e->user_set_description && !description) {
|
||||
pa_log("Entry has user_set_description set, but the description is NULL.");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
e->description = pa_xstrdup(description);
|
||||
e->icon = pa_xstrdup(icon);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue