aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-windows-common.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2010-12-06 15:57:39 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2010-12-06 15:57:39 +0000
commit9d007f19f1b49f505f6bd6386dfcc33ad73a5592 (patch)
treef002b99d18991cf5916de26b4a29110805fa0f6e /epan/dissectors/packet-windows-common.c
parent03b57df5a077e1e3590a96b0ccf675cf2bc133dd (diff)
From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5372 :
Fix crash in LDAP dissector, in a generic way (for all callers of dissect_nt_sid()). svn path=/trunk/; revision=35127
Diffstat (limited to 'epan/dissectors/packet-windows-common.c')
-rw-r--r--epan/dissectors/packet-windows-common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-windows-common.c b/epan/dissectors/packet-windows-common.c
index 2f6acc15e3..121b3adac6 100644
--- a/epan/dissectors/packet-windows-common.c
+++ b/epan/dissectors/packet-windows-common.c
@@ -1504,14 +1504,14 @@ dissect_nt_sid(tvbuff_t *tvb, int offset, proto_tree *parent_tree,
na_offset = offset;
offset++;
- /* if no tree, just return the offset of the end_of_SID+1 */
- if (!parent_tree)
- return(offset+=(6+(num_auth*4)));
-
if(sid_str)
*sid_str=NULL;
if(hf_sid==-1){
+ /* if no tree, just return the offset of the end_of_SID+1 */
+ if (!parent_tree)
+ return(offset+=(6+(num_auth*4)));
+
hf_sid=hf_nt_sid;
}