aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-01-26 22:37:04 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-01-26 22:37:04 +0000
commit6fe12c02b592f4aadbbef19f34f8705d4b43a9ed (patch)
tree69c0776373cc967f287e76dc9bb7b8096fbfeee6 /epan/dissectors
parentf92d7df152b983ec2fbe724fa8feb57f8db00aae (diff)
bugfix of crash_00001_20050124142515.cap: dissector packet-daap.c displayed [Dissector Bug] as it dissected a length field and used it without checking it first.
use tvb_ensure_bytes_exist() before using this length value, so [Malformed Packet] will be displayed svn path=/trunk/; revision=13177
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-daap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/dissectors/packet-daap.c b/epan/dissectors/packet-daap.c
index a797e9178f..9cc5db1542 100644
--- a/epan/dissectors/packet-daap.c
+++ b/epan/dissectors/packet-daap.c
@@ -190,6 +190,7 @@ dissect_daap_one_tag(proto_tree *tree, tvbuff_t *tvb, int offset, int length)
tagname = tvb_get_ntohl(tvb, offset);
tagsize = tvb_get_ntohl(tvb, offset+4);
+ tvb_ensure_bytes_exist(tvb, offset, tagsize+8);
ti = proto_tree_add_text(tree, tvb, offset, tagsize+8,
"Tag: %c%c%c%c, Size: %d",
tvb_get_guint8(tvb, offset),