aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-e164.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2013-04-02 13:09:15 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2013-04-02 13:09:15 +0000
commite8322532786fb40d9a2b6a72c4a515904e930f47 (patch)
treeb858b27ed2d697b84326a07458934785460c9b9a /epan/dissectors/packet-e164.c
parent26bdb4f056e2a1e5715004cd0429f1eec9b83b46 (diff)
From Vineeth via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8450 :
Do not try to systematically fetch a third digit for Country Code: its length can be from 1 to 3 digits. svn path=/trunk/; revision=48697
Diffstat (limited to 'epan/dissectors/packet-e164.c')
-rw-r--r--epan/dissectors/packet-e164.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-e164.c b/epan/dissectors/packet-e164.c
index 75db1f8d88..7d79d83ee8 100644
--- a/epan/dissectors/packet-e164.c
+++ b/epan/dissectors/packet-e164.c
@@ -428,8 +428,10 @@ dissect_e164_cc(tvbuff_t *tvb, proto_tree *tree, int offset, gboolean bcd_coded)
cc = cc << 4;
cc = cc | (address_digit_pair &0xf0)>>4;
cc = cc << 4;
- address_digit_pair = tvb_get_guint8(tvb, cc_offset+1);
- cc = cc | (address_digit_pair &0x0f);
+ if (tvb_bytes_exist(tvb, cc_offset+1, 1)){
+ address_digit_pair = tvb_get_guint8(tvb, cc_offset+1);
+ cc = cc | (address_digit_pair &0x0f);
+ }
}