From e6b5a93461fefc34b8c0cc5cea3d15df4fa3ed3f Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 14 Feb 2003 04:54:47 +0000 Subject: 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 --- packet-smb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'packet-smb.c') 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 * 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 @@ -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); -- cgit v1.2.3