[FFmpeg-cvslog] r13420 - trunk/libavformat/ffmdec.c
bcoudurier
subversion
Mon May 26 05:53:48 CEST 2008
Author: bcoudurier
Date: Mon May 26 05:53:48 2008
New Revision: 13420
Log:
return error if frame_offset is negative, prevent segfault
Modified:
trunk/libavformat/ffmdec.c
Modified: trunk/libavformat/ffmdec.c
==============================================================================
--- trunk/libavformat/ffmdec.c (original)
+++ trunk/libavformat/ffmdec.c Mon May 26 05:53:48 2008
@@ -104,7 +104,7 @@ static int ffm_read_data(AVFormatContext
frame_offset = get_be16(pb);
get_buffer(pb, ffm->packet, ffm->packet_size - FFM_HEADER_SIZE);
ffm->packet_end = ffm->packet + (ffm->packet_size - FFM_HEADER_SIZE - fill_size);
- if (ffm->packet_end < ffm->packet)
+ if (ffm->packet_end < ffm->packet || frame_offset < 0)
return -1;
/* if first packet or resynchronization packet, we must
handle it specifically */
More information about the ffmpeg-cvslog
mailing list