summaryrefslogtreecommitdiff
path: root/legacy/ethumb/src/bin/ethumbd.c
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@profusion.mobi>2009-10-19 14:04:43 +0000
committerRafael Antognolli <antognolli@gmail.com>2009-10-19 14:04:43 +0000
commit2b93b55313b30c8494914c89fc1c3ba6dd766ce4 (patch)
tree434303983257dc75803b7c68419d5c76309f3287 /legacy/ethumb/src/bin/ethumbd.c
parent9a0797198d2b82ede81fa7b062ca78c23c3e8a78 (diff)
Sending an empty byte array to Ethumbd through the D-Bus API was
leading to a segfault. Patch by: João Paulo Rechi Vita <jprvita@profusion.mobi> SVN revision: 43159
Diffstat (limited to '')
-rw-r--r--legacy/ethumb/src/bin/ethumbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/legacy/ethumb/src/bin/ethumbd.c b/legacy/ethumb/src/bin/ethumbd.c
index ecc6f5fd92..60ab88d9e0 100644
--- a/legacy/ethumb/src/bin/ethumbd.c
+++ b/legacy/ethumb/src/bin/ethumbd.c
@@ -905,10 +905,10 @@ _ethumb_dbus_get_bytearray(DBusMessageIter *iter)
905 dbus_message_iter_recurse(iter, &riter); 905 dbus_message_iter_recurse(iter, &riter);
906 dbus_message_iter_get_fixed_array(&riter, &result, &length); 906 dbus_message_iter_get_fixed_array(&riter, &result, &length);
907 907
908 if (result[0] == '\0') 908 if ((length == 0) || (result[0] == '\0'))
909 return NULL; 909 return NULL;
910 else 910 else
911 return eina_stringshare_add(result); 911 return eina_stringshare_add_length(result, length);
912} 912}
913 913
914static void 914static void