aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-12-01 17:47:27 -0800
committerGuy Harris <guy@alum.mit.edu>2015-12-02 01:47:55 +0000
commit6655dd93e5d4b60798a3823b51b785d7064f6e20 (patch)
treefc0cf278fc6b8bb1e0e4136d47a00abfcf749099 /epan
parent1d1a893b61cce8553274ec837b81bb3fe35ea196 (diff)
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>
Diffstat (limited to 'epan')
-rw-r--r--epan/tvbuff.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index 23353769ae..14e5e7f8b8 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -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++;