aboutsummaryrefslogtreecommitdiffstats
path: root/packet-smb.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-02-14 04:54:47 +0000
committerGuy Harris <guy@alum.mit.edu>2003-02-14 04:54:47 +0000
commite6b5a93461fefc34b8c0cc5cea3d15df4fa3ed3f (patch)
treec9b85d08e9d4179d6333b5e217527ea10f2fc5ef /packet-smb.c
parent22f0f2989ed642bec85010490e937e5b8e1d70b6 (diff)
Properly set the ACE type in the summary line for an ACE - and, while
we're at it, avoid going past the end of a packet. Put the ACE type's hex value into that line if it's an unknown type. svn path=/trunk/; revision=7144
Diffstat (limited to 'packet-smb.c')
-rw-r--r--packet-smb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/packet-smb.c b/packet-smb.c
index a62edc6a0c..068a990109 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.308 2003/02/11 04:33:24 tpot Exp $
+ * $Id: packet-smb.c,v 1.309 2003/02/14 04:54:47 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -7424,6 +7424,7 @@ dissect_nt_v2_ace(tvbuff_t *tvb, int offset, packet_info *pinfo,
int old_offset = offset;
guint16 size;
char *sid_str;
+ guint8 type;
guint8 flags;
if(parent_tree){
@@ -7433,7 +7434,8 @@ dissect_nt_v2_ace(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
/* type */
- proto_tree_add_item(tree, hf_smb_ace_type, tvb, offset, 1, TRUE);
+ type = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint(tree, hf_smb_ace_type, tvb, offset, 1, type);
offset += 1;
/* flags */
@@ -7455,8 +7457,7 @@ dissect_nt_v2_ace(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (item)
proto_item_append_text(
item, "%s, flags 0x%02x, %s", sid_str, flags,
- val_to_str(tvb_get_guint8(tvb, offset), ace_type_vals,
- "Unknown ACE type"));
+ val_to_str(type, ace_type_vals, "Unknown ACE type (0x%02x)"));
g_free(sid_str);