diff options
author | Graham Bloice <graham.bloice@trihedral.com> | 2013-01-20 10:01:34 +0000 |
---|---|---|
committer | Graham Bloice <graham.bloice@trihedral.com> | 2013-01-20 10:01:34 +0000 |
commit | cf4fcaa8b62214cd679cb413fb7b979bb0e3d2b8 (patch) | |
tree | 6de28010b00d00462b89f2bd9b88e0f02e718ee5 /asn1/snmp | |
parent | f3ba854bec2939b46d53b1e464c6508e2384246d (diff) | |
download | wireshark-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.c | 2 |
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); |