diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-12-24 21:23:38 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-12-24 21:23:38 +0000 |
commit | afc57e6face418054c17fa99877be1501eea62e0 (patch) | |
tree | de42365e7f2226a90a39c9575bda87f1b994170b | |
parent | ad69bdd7eaf7bdc9900436cdde6d8ed8eddf8f5c (diff) |
Add NULL pointer checks. Fixes the fuzz crash in bug 4351.
svn path=/trunk/; revision=31362
-rw-r--r-- | asn1/ldap/ldap.cnf | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-ldap.c | 2 | ||||
-rw-r--r-- | epan/oids.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf index 59cb3d5624..ff7a59e444 100644 --- a/asn1/ldap/ldap.cnf +++ b/asn1/ldap/ldap.cnf @@ -754,7 +754,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v const gchar *name; #.FN_BODY IntermediateResponse/_untag/responseValue - if(ldm_tree) { + if(ldm_tree && object_identifier_id) { proto_item_set_text(ldm_tree, "%%s %%s", "IntermediateResponse", object_identifier_id); name = oid_resolved_from_string(object_identifier_id); if(name) diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index b8c58ef7dd..5790f530dc 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -2889,7 +2889,7 @@ dissect_ldap_T_intermediateResponse_responseValue(gboolean implicit_tag _U_, tvb #line 757 "ldap.cnf" - if(ldm_tree) { + if(ldm_tree && object_identifier_id) { proto_item_set_text(ldm_tree, "%s %s", "IntermediateResponse", object_identifier_id); name = oid_resolved_from_string(object_identifier_id); if(name) diff --git a/epan/oids.c b/epan/oids.c index a5514fc56e..d59a73aa3e 100644 --- a/epan/oids.c +++ b/epan/oids.c @@ -746,7 +746,7 @@ guint check_num_oid(const char* str) { guint n = 0; D(8,("check_num_oid: '%s'",str)); - if (*r == '.' || *r == '\0') return 0; + if (!r || *r == '.' || *r == '\0') return 0; do { D(9,("\tcheck_num_oid: '%c' %d",*r,n)); |