diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-11-30 17:31:13 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-11-30 17:31:13 +0000 |
commit | 9417a7c86f9bd43d078721f0512cc01b27f2b835 (patch) | |
tree | 114835444c9b14ae64aa66eedb42f028528d1fc7 /epan/dissectors/packet-ltp.c | |
parent | 874657592c2e69dd20cd67015c19139144734789 (diff) |
From Jakub Zawadzki via bug 4274:
Switch back to checking size instead of asize in emem_alloc_chunk. Make
sure we don't try to cross the streams by allocating a negative amount
of memory in the LTP dissector.
svn path=/trunk/; revision=31132
Diffstat (limited to 'epan/dissectors/packet-ltp.c')
-rw-r--r-- | epan/dissectors/packet-ltp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ltp.c b/epan/dissectors/packet-ltp.c index 2de285c810..c6aed4737b 100644 --- a/epan/dissectors/packet-ltp.c +++ b/epan/dissectors/packet-ltp.c @@ -322,6 +322,9 @@ dissect_report_segment(proto_tree *ltp_tree, tvbuff_t *tvb,int frame_offset){ } rcpt_clm_cnt = evaluate_sdnv(tvb,frame_offset + segment_offset, &rcpt_clm_cnt_size); + if (rcpt_clm_cnt < 0){ + return 0; + } segment_offset += rcpt_clm_cnt_size; if((unsigned)(frame_offset + segment_offset) > tvb_length(tvb)){ return 0; |