diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-06-28 22:04:12 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-06-28 22:04:12 +0000 |
commit | edb508da4574c38b067a0800a5fa8fdcf2f469cb (patch) | |
tree | 9a2b3147665b2c090ba7bfb9049a3774da945dd2 /packet-snmp.c | |
parent | de6e607af4312a773598130ec3e61f261fd4f2f4 (diff) |
From Yaniv Kaul: Fix an SNMP crash bug.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11260 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-snmp.c')
-rw-r--r-- | packet-snmp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packet-snmp.c b/packet-snmp.c index b91c42efbb..e579e83fea 100644 --- a/packet-snmp.c +++ b/packet-snmp.c @@ -10,7 +10,7 @@ * * See RFCs 2570-2576 for SNMPv3 * - * $Id: packet-snmp.c,v 1.127 2004/05/29 01:00:59 sahlberg Exp $ + * $Id: packet-snmp.c,v 1.128 2004/06/28 22:04:12 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1703,6 +1703,11 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo, case SNMP_VERSION_2u: ret = asn1_octet_string_decode (&asn1, &community, &community_length, &length); + if (ret != ASN1_ERR_NOERROR) { + dissect_snmp_parse_error(tvb, offset, pinfo, snmp_tree, + "community (2u)", ret); + return message_length; + } if (tree) { dissect_snmp2u_parameters(snmp_tree, tvb, offset, length, community, community_length); |