check for zero-length device ID

This commit is contained in:
Andreas Steffen
2013-06-21 23:25:22 +02:00
parent 033834719d
commit 7daf6d8cc5
+6
View File
@@ -245,6 +245,12 @@ static void add_device_id(imc_msg_t *msg)
"android_id" : "/var/lib/dbus/machine-id";
value = os->get_setting(os, name);
if (value.len == 0)
{
DBG1(DBG_IMC, "no device ID available");
return;
}
/* trim trailing newline character */
if (value.ptr[value.len - 1] == '\n')
{