Commit afd17a5c authored by mru's avatar mru

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.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22571 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bdbfb06a
......@@ -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];
......
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