diff options
-rw-r--r-- | asn1/snmp/packet-snmp-template.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-snmp.c | 2 |
2 files changed, 2 insertions, 2 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); 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); |