diff options
Diffstat (limited to 'asn1/snmp')
-rw-r--r-- | asn1/snmp/packet-snmp-template.c | 2 | ||||
-rw-r--r-- | asn1/snmp/snmp.cnf | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c index cf2d8b7bfe..eb676407db 100644 --- a/asn1/snmp/packet-snmp-template.c +++ b/asn1/snmp/packet-snmp-template.c @@ -1909,7 +1909,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo, * have that routine deal with ASN.1, and just use * "tcp_dissect_pdus()"?) */ - length_remaining = tvb_ensure_length_remaining(tvb, offset); + length_remaining = tvb_ensure_captured_length_remaining(tvb, offset); /* NOTE: we have to parse the message piece by piece, since the * capture length may be less than the message length: a 'global' diff --git a/asn1/snmp/snmp.cnf b/asn1/snmp/snmp.cnf index 715a1b6934..bf7010ba41 100644 --- a/asn1/snmp/snmp.cnf +++ b/asn1/snmp/snmp.cnf @@ -95,7 +95,7 @@ gint pdu_type=-1; offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &usm_p.engine_tvb); if (usm_p.engine_tvb) { proto_tree* engine_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_engineid); - dissect_snmp_engineid(engine_tree, actx->pinfo, usm_p.engine_tvb, 0, tvb_length_remaining(usm_p.engine_tvb,0)); + dissect_snmp_engineid(engine_tree, actx->pinfo, usm_p.engine_tvb, 0, tvb_reported_length_remaining(usm_p.engine_tvb,0)); } #.FN_BODY SnmpEngineID @@ -104,7 +104,7 @@ gint pdu_type=-1; offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, ¶m_tvb); if (param_tvb) { proto_tree* engine_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_engineid); - dissect_snmp_engineid(engine_tree, actx->pinfo, param_tvb, 0, tvb_length_remaining(param_tvb,0)); + dissect_snmp_engineid(engine_tree, actx->pinfo, param_tvb, 0, tvb_reported_length_remaining(param_tvb,0)); } #.FN_PARS UsmSecurityParameters/msgUserName |