diff options
author | Gerald Combs <gerald@wireshark.org> | 2008-02-26 01:17:18 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2008-02-26 01:17:18 +0000 |
commit | 2ed9d7d43e93637a7a98d5e391b8a5d50540c193 (patch) | |
tree | 2a55dff50ea030039a22ef3b9b37de333cce3da0 /asn1 | |
parent | 2d92baa2d101f3103ef1a54f75f5389f1e6d95bd (diff) |
Make sure we don't dereference a NULL pointer. Fixes bug 2277.
svn path=/trunk/; revision=24467
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/snmp/packet-snmp-template.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c index 128fe52f03..990c391f20 100644 --- a/asn1/snmp/packet-snmp-template.c +++ b/asn1/snmp/packet-snmp-template.c @@ -790,8 +790,10 @@ set_label: oid_info->name, oid_subid2string(subids,oid_matched)); } + } else if (oid_string) { + repr = ep_strdup(oid_string); } else { - repr = ep_strdup_printf("%s", oid_string); + repr = ep_strdup("[Bad OID]"); } valstr = strstr(label,": "); |