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 /epan/dissectors | |
parent | f3ba854bec2939b46d53b1e464c6508e2384246d (diff) |
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 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-snmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index ece8f9f00c..d036d33ac3 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -2868,7 +2868,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); |