Ethereal-dev: Re: [ethereal-dev] Ethereal segfault

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

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Mon, 6 Mar 2000 11:53:57 -0800
There are some other IPP dissector bugs as well; apply the attached
patch *after* applying my previous patch (i.e., this patch does *not*
supercede my previous patch).
Index: packet-ipp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ipp.c,v
retrieving revision 1.5
diff -c -r1.5 packet-ipp.c
*** packet-ipp.c	2000/03/06 19:41:06	1.5
--- packet-ipp.c	2000/03/06 19:51:49
***************
*** 468,474 ****
  		    1 + 2 + name_length + 2 + value_length,
  		    "%.*s: %u",
  		    name_length, &pd[offset + 1 + 2],
! 		    pntohl(&pd[1 + 2 + name_length + 2]));
  	}
  	return proto_item_add_subtree(ti, ett_ipp_attr);
  }
--- 468,474 ----
  		    1 + 2 + name_length + 2 + value_length,
  		    "%.*s: %u",
  		    name_length, &pd[offset + 1 + 2],
! 		    pntohl(&pd[offset + 1 + 2 + name_length + 2]));
  	}
  	return proto_item_add_subtree(ti, ett_ipp_attr);
  }
***************
*** 481,487 ****
  	    name_length, value_length);
  	if (value_length == 4) {
  		proto_tree_add_text(tree, offset, value_length,
! 		    "Value: %u", pntohl(&pd[1 + 2 + name_length + 2]));
  	}
  }
  
--- 481,487 ----
  	    name_length, value_length);
  	if (value_length == 4) {
  		proto_tree_add_text(tree, offset, value_length,
! 		    "Value: %u", pntohl(&pd[offset]));
  	}
  }