mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
Fix erroneous behaviour when format probe hits end of file
If the format probe hits end of file, do not add the error code to the buffer position. This is obviously wrong, and with a small input file would cause a negative buffer overflow. Fixes issue 1818. Originally committed as revision 22571 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
3bd74e9243
commit
c7f625eecf
@ -495,6 +495,7 @@ int ff_probe_input_buffer(ByteIOContext **pb, AVInputFormat **fmt,
|
||||
return ret;
|
||||
}
|
||||
score = 0;
|
||||
ret = 0; /* error was end of file, nothing read */
|
||||
}
|
||||
pd.buf_size += ret;
|
||||
pd.buf = &buf[offset];
|
||||
|
Loading…
Reference in New Issue
Block a user