aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ltp.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2009-11-30 17:31:13 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2009-11-30 17:31:13 +0000
commit8b34b55c79fa8ff4d70a1da0bb99f43dcb15578b (patch)
tree114835444c9b14ae64aa66eedb42f028528d1fc7 /epan/dissectors/packet-ltp.c
parent5ea31d8c0773defe57bc30809b5a914eafc743d8 (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31132 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ltp.c')
-rw-r--r--epan/dissectors/packet-ltp.c3
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;