From f7af2880e0c9a3697734750bb0b02fd9e1ddeb4b Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Fri, 12 Aug 2005 16:32:28 +0000 Subject: [PATCH] Don't try to allocate more than ITEM_LABEL_LENGTH bytes for something we're adding to the tree. Fixes bugs 349 and 352. svn path=/trunk/; revision=15315 --- epan/dissectors/packet-giop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epan/dissectors/packet-giop.c b/epan/dissectors/packet-giop.c index 8ab4dd5353..5c0abe2850 100644 --- a/epan/dissectors/packet-giop.c +++ b/epan/dissectors/packet-giop.c @@ -2879,10 +2879,11 @@ dissect_reply_body (tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree_add_text(tree, tvb, offset-4, 4, "Exception length: %u", sequence_length); } - if (sequence_length != 0) + if (sequence_length != 0 && sequence_length < ITEM_LABEL_LENGTH) { #if 1 + tvb_ensure_bytes_exist(tvb, offset, sequence_length); header->exception_id = g_new0(gchar,sequence_length ); /* allocate buffer */ /* read exception id from buffer and store in*/