Wireshark-users: Re: [Wireshark-users] TCP Decoding differences betweenEthereal0.99and Wireshark
From: "Small, James" <JSmall@xxxxxxxxxxxxxx>
Date: Thu, 2 Nov 2006 10:51:22 -0500
Well--I installed the win32 version of SVN-19778 over my current 0.99.4
install and it works beautifully for the displaying text in TCP streams!

Thank you Joerg!
  --Jim


-----Original Message-----
Excellent!

So if I download and install SVN-19778:
http://www.wireshark.org/download/automated/win32/wireshark-setup-0.99.4
-SVN-19778.exe

It will have this fix?

--Jim


-----Original Message-----
=> > Jaap/Ulf - I know you are busy and this does not appear to be a
high
> > priority bug.  Is there any work around to "disable" the bug 852 fix
so
> > that if you want to easily display TCP stream text and are willing
to
> > except the crash risk you can?

> Use the undo_fix_852.patch to, well, undo the the fix.

I've just committed 19773, which fixes this bug. As the fix is rather
trivial I'd like someone who knows that code to have a look at it and
verify that it doesn't have any negative side effects before I close the
bug.

Here it comes:

Index: follow_dlg.c
===================================================================
--- follow_dlg.c        (revision 19771)
+++ follow_dlg.c        (working copy)
@@ -607,7 +607,7 @@
     gchar               initbuf[256];
     guint32             server_packet_count = 0;
     guint32             client_packet_count = 0;
-    char                buffer[FLT_BUF_SIZE];
+    char                buffer[FLT_BUF_SIZE+1]; /* +1 to fix ws bug
1043 */
     size_t              nchars;
     static const gchar hexchars[16] = "0123456789abcdef";

@@ -1010,7 +1010,7 @@
      * doesn't blow up on excessive long lines.
      */
     if (line_break == FALSE)
-        buffer[--i] = '\n';
+        buffer[i] = '\n';
 #endif

 #if GTK_MAJOR_VERSION < 2

Please let me know whether the fix is OK so I may close the bug (I know
That it fixes the sample capture attached to 1043).

Ciao
    Joerg