Ethereal user support <ethereal-users@xxxxxxxxxxxx> schrieb am 20.01.06 16:09:02:
>
> Hi list,
>
> Ethereal 0.10.14 on WinXP
> Capture some traffic, then stop
> Goto Statistics, Conversations
> Select the tab with 1 entry (or is it TCP, as in my case)
> Click copy button
>
> This results in most cases in an application error. The callstack shows
> that it comes from gtk_clipboard_set_text(cb, CSV_str, -1); in
> copy_as_csv_cb(GtkWindow *win _U_, gpointer data) in conversation_table.c
> What I do see is that the end of the string is no longer the "\n" catted
> to the end but another character followed by the '\0'.
>
> Can anyone reproduce this bug?
>
Yes, it's certainly a bug in gtk/conversations_table.c, where the line 1153 simply allocates (80*num_conversations) chars to hold the output string and then simply strcat() all the text into this memory area.
Of course, the conversation text will never, never by larger than 80 chars, so this will never ever overflow ;-)
Another example of incompetent usage of strcat() ...
We might want to use GLib's GString for this, just as it's correctly done in gtk/ hostlist_table.c function copy_as_csv (line 581).
The same applies to gtk/expert_comp_table.c
Regards, ULFL
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193