diff options
author | Evan Huus <eapache@gmail.com> | 2013-10-08 01:09:51 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-10-08 01:09:51 +0000 |
commit | 56d8797c9eff6b710b29f5ffd0618bfb5e96ea86 (patch) | |
tree | 97d79e45e00aaa92fc1f97d48032be2478c5ed7e /epan/dissectors/packet-gsm_cbch.c | |
parent | 7c507318b848509c270bd55ed17958f19c6f1547 (diff) | |
download | wireshark-56d8797c9eff6b710b29f5ffd0618bfb5e96ea86.tar.gz |
Don't try and fetch the repeat value of slot 0, since it makes us underflow the
array we're accessing.
Fixes the uninitialized value errors in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9243
svn path=/trunk/; revision=52445
Diffstat (limited to 'epan/dissectors/packet-gsm_cbch.c')
-rw-r--r-- | epan/dissectors/packet-gsm_cbch.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gsm_cbch.c b/epan/dissectors/packet-gsm_cbch.c index 8c253cd90c..0af0228d82 100644 --- a/epan/dissectors/packet-gsm_cbch.c +++ b/epan/dissectors/packet-gsm_cbch.c @@ -214,7 +214,13 @@ dissect_schedule_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree else if ((octet1 & 0xC0) == 0) { /* MDT 00 */ - if (octet1 < new_slots[i]) + if (octet1 == 0) + { + proto_tree_add_text(sched_subtree, tvb, offset++, 1, + "Slot: %d, Repeat of non-existant slot %d", + new_slots[i], octet1); + } + else if (octet1 < new_slots[i]) { proto_tree_add_text(sched_subtree, tvb, offset++, 1, "Slot: %d, Message ID: %d, Repeat of Slot %d", |