Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] [Patch] Fix for bug #1163: "Dissector bug. ISO8073 COTP protocol

From: Stephen Fisher <stephentfisher@xxxxxxxxx>
Date: Sun, 29 Oct 2006 09:59:34 -0800
Attached is a patch to fix bug #1163: "Dissector bug. ISO8073 COTP 
protocol."  The SES dissector was incorrectly believing it had PDUs 
within the COTP PDUs.  I added an additional heuristic check to see if 
the length of the SES PDU is 0, then return false since it can't be zero 
length.


Thanks,
  Steve

Index: epan/dissectors/packet-ses.c
===================================================================
--- epan/dissectors/packet-ses.c	(revision 19730)
+++ epan/dissectors/packet-ses.c	(working copy)
@@ -1803,6 +1803,9 @@
 	/*  OK,let's check SPDU length  */
 	/*  get length of SPDU */
 	len = get_item_len(tvb, offset+1, &len_len);
+	if(len == 0)
+		return FALSE; /* Not a valid PDU */
+
 	/*  add header length     */
 	len+=len_len;
 	/* do we have enough bytes ? */