diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2012-07-13 22:20:09 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2012-07-13 22:20:09 +0000 |
commit | 33b0d13dec74240c3c4ec8245a554dbfe020a306 (patch) | |
tree | 564d63d748f49820ef8624dab18a4739576995c5 /epan/dissectors/packet-mp4ves.c | |
parent | 7320ebcfd906ba81e9b304bb173985b850aeafb7 (diff) |
tvb_length_remaining() can return -1, so be sure to deal with it if it does.
svn path=/trunk/; revision=43708
Diffstat (limited to 'epan/dissectors/packet-mp4ves.c')
-rw-r--r-- | epan/dissectors/packet-mp4ves.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mp4ves.c b/epan/dissectors/packet-mp4ves.c index 8a5bbf68cd..280c0b5a55 100644 --- a/epan/dissectors/packet-mp4ves.c +++ b/epan/dissectors/packet-mp4ves.c @@ -593,8 +593,8 @@ dissect_mp4ves_VisualObject(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, bit_offset+=24; proto_tree_add_bits_item(tree, hf_mp4ves_start_code, tvb, bit_offset, 8, ENC_BIG_ENDIAN); bit_offset+= 8; - if(tvb_length_remaining(tvb,(bit_offset>>3))==0){ - item = proto_tree_add_text(tree, tvb, 0, -1, "Config string to short"); + if(tvb_length_remaining(tvb,(bit_offset>>3))<=0){ + item = proto_tree_add_text(tree, tvb, 0, -1, "Config string too short"); PROTO_ITEM_SET_GENERATED(item); return -1; } |