In "dissect_transaction2_request_parameters()", "bc" gets decremented as
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 15 Aug 2003 23:57:52 +0000 (23:57 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 15 Aug 2003 23:57:52 +0000 (23:57 +0000)
we go through the data, so we can't compare it with the current offset
minus the starting offset - we should just test, and use, its value
directly, as, at the end, it reflects the amount of data left.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8167 f5534014-38df-0310-8fa8-9805f1628bb7

packet-smb.c

index 91ace89b293ce16e6bfcfdb5e2d0ff0bd5b60461..c5af896e0a2078b068567b47f109a71f7801f141 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
  * 2001  Rewrite by Ronnie Sahlberg and Guy Harris
  *
- * $Id: packet-smb.c,v 1.361 2003/08/15 03:23:31 tpot Exp $
+ * $Id: packet-smb.c,v 1.362 2003/08/15 23:57:52 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -10327,10 +10327,9 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
        }
 
        /* ooops there were data we didnt know how to process */
-       if((offset-old_offset) < bc){
-               proto_tree_add_item(tree, hf_smb_unknown, tvb, offset,
-                   bc - (offset-old_offset), TRUE);
-               offset += bc - (offset-old_offset);
+       if(bc != 0){
+               proto_tree_add_item(tree, hf_smb_unknown, tvb, offset, bc, TRUE);
+               offset += bc;
        }
 
        return offset;