[pulseaudio-commits] src/modules
Tanu Kaskinen
tanuk at kemper.freedesktop.org
Tue Jul 2 07:54:50 PDT 2013
src/modules/module-device-manager.c | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 944ffb0323cdc8cf4483784b37137437ce79986a
Author: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
Date: Tue Jul 2 17:46:11 2013 +0300
device-manager: Refuse to load empty descriptions
diff --git a/src/modules/module-device-manager.c b/src/modules/module-device-manager.c
index 8f1d9cd..f578502 100644
--- a/src/modules/module-device-manager.c
+++ b/src/modules/module-device-manager.c
@@ -263,6 +263,11 @@ static struct entry* legacy_entry_read(struct userdata *u, pa_datum *data) {
return NULL;
}
+ if (!le->description[0]) {
+ pa_log_warn("Description is empty.");
+ return NULL;
+ }
+
if (!memchr(le->icon, 0, sizeof(le->icon))) {
pa_log_warn("Icon has missing NUL byte.");
return NULL;
@@ -309,6 +314,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 empty.");
+ goto fail;
+ }
+
e->description = pa_xstrdup(description);
e->icon = pa_xstrdup(icon);
More information about the pulseaudio-commits
mailing list