Wireshark-dev: Re: [Wireshark-dev] DND crash through all versions?
From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Tue, 04 Sep 2012 08:18:28 +0200
Hi list,

Ok, thanks for the response on the strstr() question. Still remain the big question: the DND crash! Am I the only one seeing this? Does the proposed patch elevate the problem on your platform?

Thanks,
Jaap


On 09/03/2012 11:50 PM, Jaap Keuter wrote:
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