[FFmpeg-cvslog] r22571 - trunk/libavformat/utils.c
mru
subversion
Tue Mar 16 22:45:30 CET 2010
Author: mru
Date: Tue Mar 16 22:45:30 2010
New Revision: 22571
Log:
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.
Modified:
trunk/libavformat/utils.c
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c Tue Mar 16 22:23:03 2010 (r22570)
+++ trunk/libavformat/utils.c Tue Mar 16 22:45:30 2010 (r22571)
@@ -495,6 +495,7 @@ int ff_probe_input_buffer(ByteIOContext
return ret;
}
score = 0;
+ ret = 0; /* error was end of file, nothing read */
}
pd.buf_size += ret;
pd.buf = &buf[offset];
More information about the ffmpeg-cvslog
mailing list