aboutsummaryrefslogtreecommitdiffstats
path: root/packet-smb.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-04-29 21:27:19 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-04-29 21:27:19 +0000
commit465ccb68b4985c05ab1bb2b695a60e94f96a84d2 (patch)
tree023697e5009882c563216935eee4b494e4f46c9f /packet-smb.c
parentcfe7b742fbdea9ae940501f84d268b7353ae7aed (diff)
Add a "proto_item_set_end()" routine that sets the length of an item
given a tvbuff/offset pair referring to the byte past the end of the item. Use it in one place in the SMB dissector (there are plenty of other places where it could be used as well). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7603 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-smb.c')
-rw-r--r--packet-smb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/packet-smb.c b/packet-smb.c
index 5e43710e38..50f512350f 100644
--- a/packet-smb.c
+++ b/packet-smb.c
@@ -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.336 2003/04/28 10:42:14 sahlberg Exp $
+ * $Id: packet-smb.c,v 1.337 2003/04/29 21:27:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -13838,7 +13838,6 @@ static smb_function smb_dissector[256] = {
static int
dissect_smb_command(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *smb_tree, guint8 cmd, gboolean first_pdu)
{
- int old_offset = offset;
smb_info_t *si;
si = pinfo->private_data;
@@ -13873,7 +13872,7 @@ dissect_smb_command(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *s
smb_dissector[cmd].request:smb_dissector[cmd].response;
offset = (*dissector)(tvb, pinfo, cmd_tree, offset, smb_tree);
- proto_item_set_len(cmd_item, offset-old_offset);
+ proto_item_set_end(cmd_item, tvb, offset);
}
return offset;
}