Wireshark-dev: [Wireshark-dev] [Patch] MODE SENSE patch
From: Patrick vd Lageweg <patrick@xxxxxxxxxxxx>
Date: Wed, 17 Jan 2007 13:23:14 +0100
Hi,

The "NUMBER OF BLOCKS" field in the SCSI MODE SENSE return data is 24 bits and not 32 bits. This patch fixes that.

	Patrick
Index: epan/dissectors/packet-scsi.c
===================================================================
--- epan/dissectors/packet-scsi.c	(revision 20458)
+++ epan/dissectors/packet-scsi.c	(working copy)
@@ -1814,7 +1814,7 @@
                 if(tvb_length_remaining(tvb, offset)<3)
                     return;
                 proto_tree_add_text (scsi_tree, tvb, offset, 3, "No. of Blocks: %u",
-                                     tvb_get_ntohl (tvb, offset));
+                                     tvb_get_ntoh24 (tvb, offset));
                 offset += 3;
 
 		offset++; /* reserved */