Only check for the last nibble being 0x0f.

That's what my_dgt_tbcd_unpack() did; do the same thing here.

Change-Id: Ia68c6ba652c748bd2661fd6eda736e880f414dc5
Reviewed-on: https://code.wireshark.org/review/12359
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2015-12-01 17:47:27 -08:00
parent 1d1a893b61
commit 6655dd93e5
1 changed files with 8 additions and 1 deletions

View File

@ -3465,8 +3465,15 @@ tvb_bcd_dig_to_wmem_packet_str(tvbuff_t *tvb, const gint offset, const gint len,
*/
octet = octet >> 4;
if (octet == 0x0f) /* odd number bytes - hit filler */
if (t_offset == length - 1 && octet == 0x0f) {
/*
* This is the last octet, and the low-order
* nibble is 0xf, so we have an odd number of
* digits, and this is a filler digit. Ignore
* it.
*/
break;
}
digit_str[i] = dgt->out[octet & 0x0f];
i++;