summaryrefslogtreecommitdiff
path: root/asn1/snmp
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2013-01-20 10:01:34 +0000
committerGraham Bloice <graham.bloice@trihedral.com>2013-01-20 10:01:34 +0000
commitcf4fcaa8b62214cd679cb413fb7b979bb0e3d2b8 (patch)
tree6de28010b00d00462b89f2bd9b88e0f02e718ee5 /asn1/snmp
parentf3ba854bec2939b46d53b1e464c6508e2384246d (diff)
downloadwireshark-cf4fcaa8b62214cd679cb413fb7b979bb0e3d2b8.tar.gz
snmp dissector did not correctly set length of pdu's of more than 127 bytes. The dissector assumed the ber identifier and length fields were always 2 bytes long, so a pdu length of more than 127 bytes, which requires more than 1 length octet, was incorrectly dissected.
svn path=/trunk/; revision=47173
Diffstat (limited to 'asn1/snmp')
-rw-r--r--asn1/snmp/packet-snmp-template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 0ba757093c..d09a3b82e8 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -1644,7 +1644,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_ber_identifier(pinfo, 0, tvb, offset, &ber_class, &pc, &tag);
/*Get the total octet length of the SNMP data*/
offset = dissect_ber_length(pinfo, 0, tvb, offset, &len, &ind);
- message_length = len + 2;
+ message_length = len + offset;
/*Get the SNMP version data*/
offset = dissect_ber_integer(FALSE, &asn1_ctx, 0, tvb, offset, -1, &version);