diff options
author | Gerald Combs <gerald@wireshark.org> | 2006-07-12 18:12:15 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2006-07-12 18:12:15 +0000 |
commit | d4819d469061d7d5eb994a73c3379efe5af97f2a (patch) | |
tree | 6d5fbf033a1ccc874bdc813b86024e4f026c1e2d /asn1/ldap | |
parent | ace05a68306dfa7e354188d5ef50ddf287aa5d77 (diff) | |
download | wireshark-d4819d469061d7d5eb994a73c3379efe5af97f2a.tar.gz wireshark-d4819d469061d7d5eb994a73c3379efe5af97f2a.tar.bz2 wireshark-d4819d469061d7d5eb994a73c3379efe5af97f2a.zip |
Make sure our strings aren't null before we pass them to strncmp().
svn path=/trunk/; revision=18723
Diffstat (limited to 'asn1/ldap')
-rw-r--r-- | asn1/ldap/packet-ldap-template.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c index fe2e0c3670..a5f262a59b 100644 --- a/asn1/ldap/packet-ldap-template.c +++ b/asn1/ldap/packet-ldap-template.c @@ -289,7 +289,7 @@ dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, pa * Add more special cases as required to prettify further * (there cant be that many ones that are truly interesting) */ - if(!strncmp("DomainSid", attributedesc_string, 9)){ + if(attributedesc_string && !strncmp("DomainSid", attributedesc_string, 9)){ tvbuff_t *sid_tvb; char *tmpstr; @@ -300,11 +300,11 @@ dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, pa g_free(tmpstr); goto finished; - } else if ( (len==16) /* GUIDs are always 16 bytes */ - && (!strncmp("DomainGuid", attributedesc_string, 10))) { + } else if ( (len==16) /* GUIDs are always 16 bytes */ + && (attributedesc_string && !strncmp("DomainGuid", attributedesc_string, 10))) { guint8 drep[4] = { 0x10, 0x00, 0x00, 0x00}; /* fake DREP struct */ e_uuid_t uuid; - + /* This octet string contained a GUID */ dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep, hf_ldap_guid, &uuid); @@ -328,7 +328,7 @@ dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, pa * for LDAP, and using that to determine how to display * attribute values and assertion values? * - * -- I dont think there are full schemas available that describe the + * -- I dont think there are full schemas available that describe the * interesting cases i.e. AD -- ronnie */ str=tvb_get_ptr(tvb, offset, len); |