Ethereal-dev: Re: [Ethereal-dev] Memory leak bug

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: didier <dgautheron@xxxxxxxx>
Date: Thu, 02 May 2002 16:31:24 +0000
Saul wrote:
> 
> Hi
> 
> There seems to be two problems with the latest cvs sources (2002-05-01) when
> run on Linux:
> 1. When capturing some AFP session, the application takes 99% of the CPU and
> swallows all the available ram & swap space 'till the system hangs. If
> anyone would care to have a look at this I have a capture file that
> demonsrates the bug.
As a quick fix (plen +16 overflow to 0), but the way dsi handles
unreassembled packets is, ... sub optimal.
Index: packet-dsi.c
===================================================================
RCS file: /cvsroot/ethereal/packet-dsi.c,v
retrieving revision 1.17
diff -u -B -r1.17 packet-dsi.c
--- packet-dsi.c	2002/05/01 07:07:09	1.17
+++ packet-dsi.c	2002/05/02 16:23:04
@@ -449,6 +449,10 @@
 		 * with that exception getting the "Unreassembled Packet"
 		 * error.
 		 */
+		if (plen > 0x7fffffff) {
+			show_reported_bounds_error(tvb, pinfo, tree);
+			return;
+		}
 		length = length_remaining;
 		if ((guint32)length > plen + 16)
 			length = plen + 16;