Ethereal-dev: Re: [Ethereal-dev] ethereal crash when set display filter

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 Mar 2006 18:08:54 +0000
Hi
Ming Zhang wrote:

only have .10.12 here, can not see anything special. i am not good at
tcp/ip. :P
I know nothing about iscsi , but try the attached patch. It fix the wrong desegmentation and the ethereal bug isn't triggered anymore.

Didier
--- epan/dissectors/packet-iscsi.c
+++ epan/dissectors/packet-iscsi.c
@@ -1747,7 +1747,6 @@ dissect_iscsi(tvbuff_t *tvb, packet_info
     guint iSCSIPdusDissected = 0;
     guint offset = 0;
     guint32 available_bytes = tvb_length_remaining(tvb, offset);
-    guint32 pduLen = 48;
     int digestsActive = 1;
     conversation_t *conversation = NULL;
     iscsi_session_t *iscsi_session=NULL;
@@ -1763,6 +1762,7 @@ dissect_iscsi(tvbuff_t *tvb, packet_info
     while(available_bytes >= 48 || (iscsi_desegment && available_bytes >= 8)) {
 	const char *opcode_str = NULL;
 	guint32 data_segment_len;
+	guint32 pduLen = 48;
 	guint8 opcode = tvb_get_guint8(tvb, offset + 0);
 	guint8 secondPduByte = tvb_get_guint8(tvb, offset + 1);
 	int badPdu = FALSE;