Ethereal-dev: Re: [Ethereal-dev] GIOP decoding broken, assertion in epan/proto.c:2072

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

From: Frederic Peters <fpeters@xxxxxxxxxxxxxx>
Date: Fri, 7 Jan 2005 22:51:43 +0100
I wrote:

> Reported as Debian bug #288746[1].
> 
>  > Just load the the attached tcp dump file in Ethereal, click on packet
>  > no. 5 ("Request 6: quit", while the method name 'quit' is purely
>  > coincidental).
> 
> [1] http://bugs.debian.org/288746

The attached patch fixes the issue but I didn't known the inner
workings of that dissector so it may be a bit rough.


Regards,
        Frederic

--- /tmp/ethereal-0.10.8/epan/dissectors/packet-giop.c	2004-12-14 20:53:44.000000000 +0100
+++ packet-giop.c	2005-01-07 14:42:46.000000000 +0100
@@ -1760,6 +1760,8 @@
 
   if (len == 0)
     return FALSE;
+  if (*offset > header->message_size)
+    return FALSE;
 
   saved_proto = pinfo->current_proto;
   for (i=0; i<len; i++) {