Commit f0a8fdbc authored by bcoudurier's avatar bcoudurier

return error if len is negative, prevent segfault

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13419 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 52959b20
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment