ANSI IS-637 A: ensure that num_fields is not null before calling text_decoder

Bug: 11014
Change-Id: Id2c7913d96743424380bd75c4005ec747ee7dd50
Reviewed-on: https://code.wireshark.org/review/7412
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
Pascal Quantin 2015-02-26 14:01:08 +01:00
parent e914bd5d36
commit 123be13127
1 changed files with 8 additions and 4 deletions

View File

@ -770,8 +770,10 @@ tele_param_user_data_cmas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
}
temp_offset = offset;
text_decoder(tvb_out, pinfo, subtree, temp_offset, encoding, num_fields,
num_bits, 3 /* (5 bits used from 'temp_offset' octet for encoding */, 0);
if (num_fields) {
text_decoder(tvb_out, pinfo, subtree, temp_offset, encoding, num_fields,
num_bits, 3 /* (5 bits used from 'temp_offset' octet for encoding */, 0);
}
offset += (record_len - 1);
@ -1130,8 +1132,10 @@ tele_param_user_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
}
}
text_decoder(tvb, pinfo, tree, offset, encoding, num_fields,
num_fields * encoding_bit_len, unused_bits, fill_bits);
if (num_fields) {
text_decoder(tvb, pinfo, tree, offset, encoding, num_fields,
num_fields * encoding_bit_len, unused_bits, fill_bits);
}
if (reserved_bits > 0)
{