Ethereal-dev: Re: [Ethereal-dev] Bug in Win32 Ethereal 0.9.16

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 4 Nov 2003 10:26:38 -0800
On Tue, Nov 04, 2003 at 11:31:24AM +0000, Gordon McKinney wrote:
> Looks like a null pointer. Reading the same trace file in 0.9.15 works,

Good - you still have the trace to test a fix, if you have a compiler
(which I infer you do, as you have the source and a detailed stack trace
- which helped in finding the problem).

Try applying the attached patch to "packet-dcerpc.c" and recompiling,
and see if that fixes the problem.  (It's not Win32-specific.)
Index: packet-dcerpc.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-dcerpc.c,v
retrieving revision 1.150
diff -c -r1.150 packet-dcerpc.c
*** packet-dcerpc.c	23 Oct 2003 07:14:21 -0000	1.150
--- packet-dcerpc.c	4 Nov 2003 18:25:50 -0000
***************
*** 2572,2577 ****
--- 2572,2583 ----
         thus we must reassemble it.
      */
  
+     /* Do we have any non-encrypted data to reassemble? */
+     if (decrypted_tvb == NULL) {
+       /* No.  We can't even try to reassemble.  */
+       goto end_cn_stub;
+     }
+ 
      /* if this is the first fragment we need to start reassembly
      */
      if(hdr->flags&PFC_FIRST_FRAG){
***************
*** 2642,2648 ****
  			" [DCE/RPC %s fragment]", fragment_type(hdr->flags));
  	}
  
!         show_stub_data (decrypted_tvb, 0, tree, auth_info, FALSE);
      }
  
      pinfo->fragmented = save_fragmented;
--- 2648,2657 ----
  			" [DCE/RPC %s fragment]", fragment_type(hdr->flags));
  	}
  
!         if (decrypted_tvb != NULL)
!             show_stub_data (decrypted_tvb, 0, tree, auth_info, FALSE);
!         else
!             show_stub_data (tvb, 0, tree, auth_info, TRUE);
      }
  
      pinfo->fragmented = save_fragmented;