diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-08-12 16:32:28 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-08-12 16:32:28 +0000 |
commit | 4d9cde11f6bd56bceb96718be6e29528860960be (patch) | |
tree | 8c0136b3df222cbfc5c75ffe1d926f6b2d06d306 /epan/dissectors/packet-giop.c | |
parent | dcf5987fc7bb907219f90e460ebeb68ed0c8e92e (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.c | 3 |
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*/ |