aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-giop.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-12 16:32:28 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-12 16:32:28 +0000
commit4d9cde11f6bd56bceb96718be6e29528860960be (patch)
tree8c0136b3df222cbfc5c75ffe1d926f6b2d06d306 /epan/dissectors/packet-giop.c
parentdcf5987fc7bb907219f90e460ebeb68ed0c8e92e (diff)
Don't try to allocate more than ITEM_LABEL_LENGTH bytes for something we're
adding to the tree. Fixes bugs 349 and 352. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15315 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-giop.c')
-rw-r--r--epan/dissectors/packet-giop.c3
1 files changed, 2 insertions, 1 deletions
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*/