Wireshark mailing list archives

DND crash through all versions?


From: Jaap Keuter <jaap.keuter () xs4all nl>
Date: Mon, 03 Sep 2012 23:50:25 +0200

Hi list,

This strikes me as too odd: on whatever version I tried (1.2, 1.4, 1.6. 1.8, head) when I DND a single capture file, it crashes.

Ok, bit of context: Compiled (32-bit) with GTK+ 2.24.10, with Cairo 1.12.2, with Pango 1.30.0, with GLib 2.32.3, etc.
Debian testing/KDE, but also FC14/KDE (not sure on the GTK/GDK there)

A little digging showed me that the URL(list) dnd_data_received() gets aren't /r/n terminated. If there are multiple files dropped all but the last are /r/n terminated, so if you drop two files it read the first, but not the last. When you drop one file it's seeing no file and goes on to assign to a zero sized array.

I've made a patch here that needs to be verified on other platforms first to see nothing breaks and further. Hope you can give it a go.

Anyone knows what strstr() does with a NULL for a haystack? As far as I can tell it's unspecified.

Thanks,
Jaap

Attachment: DND_fix.patch
Description:

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: