forked from osmocom/wireshark
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
This commit is contained in:
parent
86d66bc85c
commit
f7af2880e0
|
@ -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*/
|
||||
|
|
Loading…
Reference in New Issue