From c303679d999f38d92a00f0cf99ba0a000a9ff92f Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 12 Jan 2017 23:14:44 -0800 Subject: Decode TBCD strings in GSM MAP as per the GSM MAP spec. Hex digits 0xa through 0xe are '*', '#', 'a', 'b', and 'c', respectively. Constify the dgt_set_t argument to tvb_bcd_dig_to_wmem_packet_str(), while we're at it. Bug: 13316 Change-Id: I7586f35d23fd262453779d99946e7ccad4b6ffab Reviewed-on: https://code.wireshark.org/review/19620 Reviewed-by: Guy Harris --- epan/tvbuff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/tvbuff.c') diff --git a/epan/tvbuff.c b/epan/tvbuff.c index 6bd1c4b341..2d5408ab23 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -3519,14 +3519,14 @@ tvb_bytes_to_str_punct(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset * A pointer to the packet scope allocated string will be returned. * Note a tvbuff content of 0xf is considered a 'filler' and will end the conversion. */ -static dgt_set_t Dgt1_9_bcd = { +static const dgt_set_t Dgt1_9_bcd = { { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f*/ '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?','?' } }; const gchar * -tvb_bcd_dig_to_wmem_packet_str(tvbuff_t *tvb, const gint offset, const gint len, dgt_set_t *dgt, gboolean skip_first) +tvb_bcd_dig_to_wmem_packet_str(tvbuff_t *tvb, const gint offset, const gint len, const dgt_set_t *dgt, gboolean skip_first) { int length; guint8 octet; -- cgit v1.2.3