Ethereal-dev: Re: [Ethereal-dev] Inquiry data causes hang

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

From: Dinesh G Dutt <ddutt@xxxxxxxxx>
Date: Wed, 16 Apr 2003 12:10:00 -0700
I found the problem and have a fix for it. The problem of the hang is caused
due to an incorrect math. The fix is as follows:
--
===File /d/work/ethereal-cvs/ethereal/patch=================
Index: packet-scsi.c
===================================================================
RCS file: /cvsroot/ethereal/packet-scsi.c,v
retrieving revision 1.27
diff -u -r1.27 packet-scsi.c
--- packet-scsi.c	10 Mar 2003 02:18:19 -0000	1.27
+++ packet-scsi.c	16 Apr 2003 19:09:25 -0000
@@ -1454,8 +1454,8 @@
                                          tvb_bytes_to_str (tvb, offset+4,
                                                            idlen));
                 }
-                plen -= idlen;
-                offset += idlen;
+                plen -= (idlen + 3);
+                offset += (idlen + 3);
             }
             break;
         case SCSI_EVPD_DEVSERNUM:
============================================================