aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2006-07-09 22:12:02 +0000
committerGerald Combs <gerald@wireshark.org>2006-07-09 22:12:02 +0000
commit8b315480f1df953751fda12c58ed891862e03edc (patch)
tree55cf0cb616310c4e42a93835a86f9ecffedaad3e /asn1
parent6dd2196da600c33b59572c1571f4f7dc3225c870 (diff)
In new_format_oid(), handle a zero-length OID.
Fix a bug introduced recently in packet-rpc.c. Replace DISSECTOR_ASSERT() with THROW(ReportedBoundsError) in my recent checkins, since fuzz-test.sh sets WIRESHARK_ABORT_ON_DISSECTOR_BUG. svn path=/trunk/; revision=18693
Diffstat (limited to 'asn1')
-rw-r--r--asn1/snmp/packet-snmp-template.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 992831a74b..452485e26a 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -449,6 +449,11 @@ new_format_oid(subid_t *oid, guint oid_length,
unsigned int i;
char *buf;
+ if (oid == NULL || oid_length < 1) {
+ *decoded = NULL;
+ return;
+ }
+
#ifdef HAVE_SOME_SNMP
guchar *oid_string;
size_t oid_string_len;