mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-25 01:32:48 +08:00
return error if len is negative, prevent segfault
Originally committed as revision 13419 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -89,6 +89,8 @@ static int ffm_read_data(AVFormatContext *s,
|
||||
while (size > 0) {
|
||||
redo:
|
||||
len = ffm->packet_end - ffm->packet_ptr;
|
||||
if (len < 0)
|
||||
return -1;
|
||||
if (len > size)
|
||||
len = size;
|
||||
if (len == 0) {
|
||||
|
Reference in New Issue
Block a user