Wireshark-dev: Re: [Wireshark-dev] DND crash through all versions?

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Tue, 04 Sep 2012 15:29:46 +0200
On 2012-09-04 08:32, Joerg Mayer wrote:
On Tue, Sep 04, 2012 at 08:18:28AM +0200, Jaap Keuter wrote:
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?

Hmm, sorry, I missed the patch (actually I deleted that mail already). So how about a) adding \r\n\0 to the end of the string instead of just \0
in dnd_open_file_cmd?
Can the case of a NULL haystack happen?

Ciao
 Jörg

Hi,

If you can dig up the patch you'll see that the end is already padded in dnd_data_received() with \r\n\0, if not already ending with \n. So that part is covered. Also then strstr() haystack being NULL should never happen, so g_error should always be able to print cf_name.

But main problem remains: In dnd_open_file_cmd() in_filenames can be NULL, because in_files can be 0(!), because of a failed \r\n count. This happens when an un-terminated (as in no \r\n) URL comes in via DND. That is the cause of the crash I saw.

Does anyone else see this?

BTW: The 1.4.10 version context is "Compiled (64-bit) with GTK+ 2.22.0, with GLib 2.26.0"

Thanks,
Jaap