aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sbc.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-04-02 21:13:02 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-04-02 21:13:02 +0000
commitee5c5e93612f6b9b875cfe8736bf738242c3c11f (patch)
tree9101994fc9188ddf1c9a2325a6b3f5a603cf25dc /epan/dissectors/packet-sbc.c
parent432e914dbd43c3ee354aa1eeff8f2dc750913f0e (diff)
Both tvb_length_remaining and tvb_reported_length_remaining can return -1.
#BACKPORT(1.6,1.8 ... manually as other occurrences are in those trunks) svn path=/trunk/; revision=48710
Diffstat (limited to 'epan/dissectors/packet-sbc.c')
-rw-r--r--epan/dissectors/packet-sbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-sbc.c b/epan/dissectors/packet-sbc.c
index 4680ffcf73..f9f5cc22d2 100644
--- a/epan/dissectors/packet-sbc.c
+++ b/epan/dissectors/packet-sbc.c
@@ -139,7 +139,7 @@ dissect_sbc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
number_of_frames = tvb_get_guint8(tvb, offset) & 0x0F;
offset += 1;
- while (tvb_length_remaining(tvb, offset)) {
+ while (tvb_length_remaining(tvb, offset) > 0) {
byte = tvb_get_guint8(tvb, offset + 1);
frequency = (byte & 0xC0) >> 6;
blocks = (byte & 0x30) >> 4;