Remove more deprecated tvb_length

Change-Id: Iac23a6c804ad3720d37186559477909b2ff33eb2
Reviewed-on: https://code.wireshark.org/review/9042
Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
Evan Huus 2015-06-22 17:19:23 -07:00
parent 67ab8a059c
commit 958cef5d68
24 changed files with 61 additions and 65 deletions

View File

@ -440,7 +440,7 @@ dissect_png(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *da
/* http://libpng.org/pub/png/spec/1.2/PNG-Structure.html#PNG-file-signature */
static const guint8 magic[8] = { 137, 80, 78, 71, 13, 10, 26, 10 };
if (tvb_length(tvb) < 20)
if (tvb_captured_length(tvb) < 20)
return 0;
if (tvb_memeql(tvb, 0, magic, sizeof(magic)) != 0)
return 0;

View File

@ -84,7 +84,7 @@ krb5rpc_dissect_sendto_kdc_rqst (tvbuff_t * tvb, int offset,
item = proto_tree_add_item (tree, hf_krb5rpc_krb5, tvb, offset, -1, ENC_NA);
subtree = proto_item_add_subtree (item, ett_krb5rpc_krb5);
remain = tvb_length_remaining(tvb, offset);
remain = tvb_captured_length_remaining(tvb, offset);
krb5_tvb = tvb_new_subset (tvb, offset, remain, remain);
offset = dissect_kerberos_main (krb5_tvb, pinfo, subtree, TRUE, NULL);
@ -129,7 +129,7 @@ krb5rpc_dissect_sendto_kdc_resp (tvbuff_t * tvb, int offset,
item = proto_tree_add_item (tree, hf_krb5rpc_krb5, tvb, offset, -1, ENC_NA);
subtree = proto_item_add_subtree (item, ett_krb5rpc_krb5);
remain = tvb_length_remaining(tvb, offset);
remain = tvb_captured_length_remaining(tvb, offset);
krb5_tvb = tvb_new_subset (tvb, offset, remain, remain);
offset = dissect_kerberos_main (krb5_tvb, pinfo, subtree, TRUE, NULL);

View File

@ -7704,7 +7704,7 @@ dissect_packet_data(tvbuff_t *tvb ,tvbuff_t *auth_tvb _U_,
int data_len;
guint64 copyconfounder = vars->confounder;
data_len = tvb_length_remaining(tvb,offset);
data_len = tvb_captured_length_remaining(tvb,offset);
if (data_len < 0) {
return NULL;
}

View File

@ -91,7 +91,7 @@ dissect_ndr_datablob(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_registrar_get_name(hf_index));
if (use_remaining_space) {
len = tvb_length_remaining (tvb, offset);
len = tvb_captured_length_remaining (tvb, offset);
} else {
offset = dissect_ndr_uint3264(tvb, offset, pinfo, subtree, di, drep,
hf_nt_data_blob_len, &len);

View File

@ -967,7 +967,7 @@ rs_pgo_dissect_add_resp (tvbuff_t * tvb, int offset,
[out] error_status_t *status
*/
buff_remain = tvb_length_remaining(tvb, offset);
buff_remain = tvb_captured_length_remaining(tvb, offset);
/* found several add_member responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
if (buff_remain > 8) {
@ -1019,7 +1019,7 @@ rs_pgo_dissect_delete_resp (tvbuff_t * tvb, int offset,
[out] rs_cache_data_t *cache_info,
[out] error_status_t *status
*/
buff_remain = tvb_length_remaining(tvb, offset);
buff_remain = tvb_captured_length_remaining(tvb, offset);
/* found several add_member responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
@ -1185,7 +1185,7 @@ rs_pgo_dissect_add_member_resp (tvbuff_t * tvb, int offset,
[out] error_status_t *status
*/
buff_remain = tvb_length_remaining(tvb, offset);
buff_remain = tvb_captured_length_remaining(tvb, offset);
/* found several add responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
if (buff_remain > 8) {

View File

@ -1071,7 +1071,7 @@ dissect_spoolss_uint16uni(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* Get remaining data in buffer as a string */
remaining = tvb_length_remaining(tvb, offset);
remaining = tvb_captured_length_remaining(tvb, offset);
if (remaining <= 0) {
if (data)
*data = g_strdup("");
@ -3849,7 +3849,7 @@ dissect_FORM_1(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Eek - we need to know whether this pointer was NULL or not.
Currently there is not any way to do this. */
if (tvb_length_remaining(tvb, offset) <= 0)
if (tvb_reported_length_remaining(tvb, offset) <= 0)
goto done;
offset = dissect_ndr_uint32(
@ -4189,7 +4189,7 @@ static int
SpoolssGeneric_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep _U_)
{
int len = tvb_length(tvb);
int len = tvb_reported_length(tvb);
proto_tree_add_text(tree, tvb, offset, 0,
"[Unimplemented dissector: SPOOLSS]");

View File

@ -178,7 +178,7 @@ dissect_dcp_etsi (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void *
* Don't accept this packet unless at least a full AF header present(10 bytes).
* It should be possible to strengthen the heuristic further if need be.
*/
if(tvb_length(tvb) < 11)
if(tvb_captured_length(tvb) < 11)
return FALSE;
word = tvb_get_ntohs(tvb,0);
@ -337,11 +337,11 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
NULL, tree);
}
}
if(new_tvb && tvb_length(new_tvb) > 0) {
if(new_tvb && tvb_captured_length(new_tvb) > 0) {
gboolean decoded;
tvbuff_t *dtvb = NULL;
const guint8 *input = tvb_get_ptr(new_tvb, 0, -1);
guint32 reassembled_size = tvb_length(new_tvb);
guint32 reassembled_size = tvb_captured_length(new_tvb);
guint8 *deinterleaved = (guint8*) g_malloc (reassembled_size);
guint8 *output = (guint8*) g_malloc (decoded_size);
rs_deinterleave(input, deinterleaved, plen, fcount);
@ -501,7 +501,7 @@ dissect_pft(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
offset += 2;
if (fcount > 1) { /* fragmented*/
gboolean save_fragmented = pinfo->fragmented;
guint16 real_len = tvb_length(tvb)-offset;
guint16 real_len = tvb_captured_length(tvb)-offset;
proto_tree_add_item (pft_tree, hf_edcp_pft_payload, tvb, offset, real_len, ENC_NA);
if(real_len != payload_len || real_len == 0) {
proto_item_append_text(li, " (length error (%d))", real_len);
@ -549,7 +549,7 @@ dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
offset += 2;
payload_len = tvb_get_ntohl(tvb, offset);
if (tree) {
guint32 real_payload_len = tvb_length(tvb)-12;
guint32 real_payload_len = tvb_captured_length(tvb)-12;
li = proto_tree_add_item (af_tree, hf_edcp_len, tvb, offset, 4, ENC_BIG_ENDIAN);
if(real_payload_len < payload_len) {
proto_item_append_text (li, " (wrong len claims %d is %d)",
@ -612,7 +612,7 @@ dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
ti = proto_tree_add_item (tree, proto_tpl, tvb, 0, -1, ENC_NA);
tpl_tree = proto_item_add_subtree (ti, ett_tpl);
while(offset<tvb_length(tvb)) {
while(offset<tvb_reported_length(tvb)) {
guint32 bits;
guint32 bytes;
char *tag = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 4, ENC_ASCII); offset += 4;

View File

@ -758,7 +758,7 @@ dissect_dlm3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *d
/* Check that there's enough data */
length = tvb_length(tvb);
length = tvb_captured_length(tvb);
if (length < 4 + 4 + 4 + 2 + 1 + 1)
return 0;
@ -837,7 +837,7 @@ dissect_dlm3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *d
dissect_dlm3_rcom(tvb, pinfo, sub_tree, length, offset);
}
}
return tvb_length(tvb);
return tvb_captured_length(tvb);
}

View File

@ -422,7 +422,7 @@ dissect_dlsw_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
}
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
static void
@ -570,7 +570,7 @@ dissect_dlsw_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
}
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 4, get_dlsw_pdu_len, dissect_dlsw_pdu, data);
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
void

View File

@ -2653,7 +2653,7 @@ static gint dissect_dmp_ack (tvbuff_t *tvb, packet_info *pinfo,
if (dmp.ack_rec_present) {
/* Recipient List */
rec_len = tvb_length (tvb);
rec_len = tvb_reported_length (tvb);
if (dmp.checksum) {
rec_len -= 2;
}
@ -3157,7 +3157,7 @@ static gint dissect_dmp_message (tvbuff_t *tvb, packet_info *pinfo,
offset += 1;
}
len = tvb_length_remaining (tvb, offset);
len = tvb_reported_length_remaining (tvb, offset);
if (dmp.checksum) {
len -= 2;
}
@ -3181,7 +3181,7 @@ static gint dissect_dmp_message (tvbuff_t *tvb, packet_info *pinfo,
dmp.body_format == FREE_TEXT_SUBJECT)) {
if (compr_alg == ALGORITHM_ZLIB) {
if ((body_tvb = tvb_child_uncompress (tvb, tvb, offset, len)) != NULL) {
body_len = tvb_length (body_tvb);
body_len = tvb_captured_length (body_tvb);
add_new_data_source (pinfo, body_tvb, "Uncompressed User data");
tf = proto_tree_add_item (message_tree, hf_message_body_data,
body_tvb, 0, body_len, ENC_NA);
@ -3889,7 +3889,7 @@ static gint dissect_dmp_content (tvbuff_t *tvb, packet_info *pinfo,
offset = dissect_dmp_message (tvb, pinfo, dmp_tree, offset);
} else if (dmp.msg_type == REPORT) {
/* One or more Delivery Report or Non-Delivery Report Data */
rep_len = tvb_length (tvb);
rep_len = tvb_reported_length (tvb);
if (dmp.checksum) {
rep_len -= 2;
}
@ -3984,7 +3984,7 @@ static int dissect_dmp (tvbuff_t *tvb, packet_info *pinfo,
}
if (dmp.checksum) {
length = tvb_length (tvb);
length = tvb_captured_length (tvb);
checksum1 = crc16_x25_ccitt_tvb (tvb, length - 2);
checksum2 = tvb_get_ntohs (tvb, offset);

View File

@ -187,7 +187,7 @@ dissect_dmx_sip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 1;
if (offset < tvb_length(tvb))
if (offset < tvb_reported_length(tvb))
proto_tree_add_item(dmx_sip_tree, hf_dmx_sip_trailer, tvb,
offset, -1, ENC_NA);
}

View File

@ -103,7 +103,7 @@ dissect_dmx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
call_dissector(dmx_sip_handle, next_tvb, pinfo, tree);
break;
default:
if (offset < tvb_length(tvb))
if (offset < tvb_reported_length(tvb))
call_dissector(data_handle, next_tvb, pinfo, tree);
break;
}

View File

@ -1802,7 +1802,7 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset,
if (num_items < 0) {
proto_item_append_text(range_item, " (bogus)");
expert_add_info(pinfo, range_item, &ei_dnp_num_items_neg);
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
@ -2839,7 +2839,7 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset,
default: /* In case of unknown object */
proto_tree_add_item(object_tree, hf_dnp3_unknown_data_chunk, tvb, offset, -1, ENC_NA);
offset = tvb_length(tvb); /* Finish decoding if unknown object is encountered... */
offset = tvb_captured_length(tvb); /* Finish decoding if unknown object is encountered... */
break;
}
@ -2848,7 +2848,7 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset,
}
if (start_offset > offset) {
expert_add_info(pinfo, point_item, &ei_dnp_invalid_length);
offset = tvb_length(tvb); /* Finish decoding if unknown object is encountered... */
offset = tvb_captured_length(tvb); /* Finish decoding if unknown object is encountered... */
}
}
}
@ -2881,7 +2881,7 @@ dissect_dnp3_al(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
nstime_set_zero (&al_cto);
data_len = tvb_length(tvb);
data_len = tvb_captured_length(tvb);
/* Handle the control byte and function code */
al_ctl = tvb_get_guint8(tvb, offset);
@ -3433,7 +3433,7 @@ dissect_dnp3_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
}
}
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
static gboolean

View File

@ -1124,7 +1124,7 @@ static gboolean heur_dissect_dplay(tvbuff_t *tvb, packet_info *pinfo, proto_tree
{
guint32 dplay_id, token;
if(tvb_length(tvb) < 25)
if(tvb_captured_length(tvb) < 25)
return FALSE;
/* The string play = 0x706c6179 */

View File

@ -697,7 +697,7 @@ dissect_drda(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
iPreviousFrameNumber = pinfo->fd->num;
/* There may be multiple DRDA commands in one frame */
while ((guint) (offset + 10) <= tvb_length(tvb))
while ((guint) (offset + 10) <= tvb_reported_length(tvb))
{
iCommand = tvb_get_ntohs(tvb, offset + 8);
iLength = tvb_get_ntohs(tvb, offset + 0);
@ -737,11 +737,11 @@ dissect_drda(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
/* The number of attributes is variable */
for (offset += 10; offset < iCommandEnd; )
{
if (tvb_length_remaining(tvb, offset) >= 2)
if (tvb_reported_length_remaining(tvb, offset) >= 2)
{
iLengthParam = tvb_get_ntohs(tvb, offset + 0);
if (iLengthParam == 0 || iLengthParam == 1) iLengthParam = iLength - 10;
if (tvb_length_remaining(tvb, offset) >= iLengthParam)
if (tvb_reported_length_remaining(tvb, offset) >= iLengthParam)
{
iParameterCP = tvb_get_ntohs(tvb, offset + 2);
drda_tree_sub = proto_tree_add_subtree(drdaroot_tree, tvb, offset, iLengthParam,
@ -776,24 +776,20 @@ dissect_drda(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
}
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
static guint
get_drda_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
{
if (tvb_length_remaining(tvb, offset) >= 10)
{
return (tvb_get_ntohs(tvb, offset));
}
return 0;
return (tvb_get_ntohs(tvb, offset));
}
static int
dissect_drda_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
tcp_dissect_pdus(tvb, pinfo, tree, drda_desegment, 10, get_drda_pdu_len, dissect_drda, data);
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
@ -801,7 +797,7 @@ static gboolean
dissect_drda_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
conversation_t * conversation;
if (tvb_length(tvb) >= 10)
if (tvb_captured_length(tvb) >= 10)
{
/* The first header is 6 bytes long, so the length in the second header should 6 bytes less */
guint16 cOuterLength, cInnerLength;

View File

@ -321,7 +321,7 @@ dissect_dsi_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
break;
}
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
static guint
@ -335,7 +335,7 @@ get_dsi_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U
if ( dsi_flags > DSIFL_MAX || !dsi_command || dsi_command > DSIFUNC_MAX)
{
/* it's not a known dsi pdu start sequence */
return tvb_length_remaining(tvb, offset);
return tvb_captured_length_remaining(tvb, offset);
}
/*
@ -356,7 +356,7 @@ dissect_dsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
tcp_dissect_pdus(tvb, pinfo, tree, dsi_desegment, 12,
get_dsi_pdu_len, dissect_dsi_packet, data);
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
void

View File

@ -1760,7 +1760,7 @@ dissect_dtn_contact_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
proto_tree_add_item(conv_tree, hf_contact_hdr_local_eid, tvb, sdnv_length + offset, eid_length, ENC_NA|ENC_ASCII);
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
static guint
@ -1889,7 +1889,7 @@ dissect_tcpcl_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
if (bundle_size == 0) {
/*Couldn't parse bundle, treat as raw data */
call_dissector(data_handle, new_tvb, pinfo, sub_tree);
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
}
else {
@ -1946,7 +1946,7 @@ dissect_tcpcl_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
break;
}
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
static int
@ -2003,7 +2003,7 @@ dissect_tcpcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
}
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 8, get_dtn_contact_header_len, dissect_dtn_contact_header, data);
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
/* Not for us */
@ -2011,7 +2011,7 @@ dissect_tcpcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
};
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 1, get_tcpcl_pdu_len, dissect_tcpcl_pdu, data);
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
static int

View File

@ -774,7 +774,7 @@ dissect_dtpt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
}
}
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
void proto_reg_handoff_dtpt(void);

View File

@ -466,7 +466,7 @@ dissect_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *tree,
/* extract tag and length from the parameter */
tag = tvb_get_ntohs(parameter_tvb, PARAMETER_TAG_OFFSET);
length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET);
padding_length = tvb_length(parameter_tvb) - length;
padding_length = tvb_reported_length(parameter_tvb) - length;
/* create proto_tree stuff */
parameter_tree = proto_tree_add_subtree(dua_tree, parameter_tvb, PARAMETER_HEADER_OFFSET,
@ -542,7 +542,7 @@ dissect_parameters(tvbuff_t *parameters_tvb, packet_info *pinfo, proto_tree *tre
tvbuff_t *parameter_tvb;
offset = 0;
while((remaining_length = tvb_length_remaining(parameters_tvb, offset))) {
while((remaining_length = tvb_reported_length_remaining(parameters_tvb, offset))) {
length = tvb_get_ntohs(parameters_tvb, offset + PARAMETER_LENGTH_OFFSET);
total_length = ADD_PADDING(length);
if (remaining_length >= length)

View File

@ -700,7 +700,7 @@ static gboolean test_dvb_s2_crc(tvbuff_t *tvb, guint offset) {
guint8 input8;
/* only check BB Header and return */
if (tvb_length(tvb) < (offset + DVB_S2_BB_HEADER_LEN))
if (tvb_captured_length(tvb) < (offset + DVB_S2_BB_HEADER_LEN))
return FALSE;
input8 = tvb_get_guint8(tvb, offset + DVB_S2_BB_OFFS_CRC);
@ -820,7 +820,7 @@ static int dissect_dvb_s2_modeadapt(tvbuff_t *tvb, packet_info *pinfo, proto_tre
guint8 byte;
/* Check that there's enough data */
if (tvb_length(tvb) < 1)
if (tvb_captured_length(tvb) < 1)
return 0;
/* Check if first byte is valid for this dissector */

View File

@ -687,7 +687,7 @@ dissect_dvmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
item = proto_tree_add_item(parent_tree, proto_dvmrp, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree(item, ett_dvmrp);
if ((tvb_length_remaining(tvb, offset)>=8)
if ((tvb_captured_length_remaining(tvb, offset)>=8)
&& (((tvb_get_guint8(tvb, 6)==0xff)
&& (tvb_get_guint8(tvb, 7)==0x03))
|| !strict_v3)) {

View File

@ -74,9 +74,9 @@ dissect_e100(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
* (2) e100 header is 1
* (3) e100 capture size matches tvb packet size
*/
if (tvb_length(tvb) >= e100_encap_len &&
if (tvb_captured_length(tvb) >= e100_encap_len &&
tvb_get_guint8(tvb, e100_header_ver.offset) == 1 &&
tvb_get_ntohl(tvb, e100_bytes_cap.offset) == tvb_length(tvb)-e100_encap_len)
tvb_get_ntohl(tvb, e100_bytes_cap.offset) == tvb_reported_length(tvb)-e100_encap_len)
{
guint32 bytes_captured=0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "e100");
@ -117,7 +117,7 @@ dissect_e100(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
next_tvb = tvb_new_subset(tvb, e100_encap_len, -1, bytes_captured);
call_dissector(eth_handle, next_tvb, pinfo, tree);
ret_val = tvb_length(tvb);
ret_val = tvb_captured_length(tvb);
} /* heuristic testing */
return ret_val;

View File

@ -858,7 +858,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
gint tvb_len;
gboolean save_fragmented;
tvb_len = tvb_length_remaining(tvb, offset);
tvb_len = tvb_captured_length_remaining(tvb, offset);
if (size < tvb_len)
tvb_len = size;
@ -1189,7 +1189,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
} /* switch (eap_code) */
return tvb_length(tvb);
return tvb_captured_length(tvb);
}
void

View File

@ -146,7 +146,7 @@ static void dissect_egd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(egd_tree, hf_egd_resv, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
data_length = tvb_length_remaining(tvb, offset);
data_length = tvb_reported_length_remaining(tvb, offset);
if (data_length > 0)
{
next_tvb = tvb_new_subset_remaining(tvb, offset);