check that itl is non-NULL to prevent a NULL pointer dereference that would crash...
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 4 Aug 2006 00:36:25 +0000 (00:36 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 4 Aug 2006 00:36:25 +0000 (00:36 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18832 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-scsi.c

index 1a591bdcee36969694f6105262fb2a4279df69e1..fb1963a805fbde33d4d88ec3df30e10c4e1b395c 100644 (file)
@@ -7809,10 +7809,11 @@ dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     const char *old_proto;
     cmdset_t *csdata;
 
-    if(!itlq){
+    if(!itlq || !itl){
         /* we have no record of this exchange and so we can't dissect the
          * payload
          */
+       proto_tree_add_text(tree, tvb, offset, 0, "Unknown SCSI exchange, can not decode SCSI data");
         return;
     }