From b5daab9d464d239b0bf24379c6472ba09af35f66 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 21 May 2007 17:13:05 +0000 Subject: fix a local DoS (by hitting an assert) when passing empty TXT strings to the avahi-daemon for regsitration. (Problem identified and original patch supplied by Emanuele Aina) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1482 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/dbus-util.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'avahi-daemon/dbus-util.c') diff --git a/avahi-daemon/dbus-util.c b/avahi-daemon/dbus-util.c index d1a7a20..ca08d7b 100644 --- a/avahi-daemon/dbus-util.c +++ b/avahi-daemon/dbus-util.c @@ -344,6 +344,9 @@ int avahi_dbus_read_strlst(DBusMessage *m, int idx, AvahiStringList **l) { k = (const uint8_t*) ""; n = 0; dbus_message_iter_get_fixed_array(&sub2, &k, &n); + + if (!k) + k = (const uint8_t*) ""; strlst = avahi_string_list_add_arbitrary(strlst, k, n); -- cgit