aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorpascal <pascal@localhost>2012-04-25 20:20:23 +0000
committerpascal <pascal@localhost>2012-04-25 20:20:23 +0000
commit1cd8ca08a6495a8a1ecb86fcdac36e7cc78d2997 (patch)
treeea8c2e9047bfea1565b479dd380018a67cafae44 /asn1
parent2787ebf988e2a38de8fea7ffa41a0f989a2c6a0e (diff)
From Evan Huus:
Fix Integer32 length field detection https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7192 svn path=/trunk/; revision=42241
Diffstat (limited to 'asn1')
-rw-r--r--asn1/snmp/packet-snmp-template.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index edecea1a8a..ed90a594a2 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -759,8 +759,9 @@ indexing_done:
unsigned int_val_offset = value_offset;
unsigned i;
- max_len = 5; min_len = 1;
- if (value_len > (guint)max_len && value_len < (guint)min_len) {
+ max_len = 4; min_len = 1;
+ if (value_len > (guint)max_len || value_len < (guint)min_len) {
+ hfid = hf_snmp_integer32_value;
format_error = BER_WRONG_LENGTH;
break;
}