[FFmpeg-devel] Fix mjpeg decoder runaway from internal buffer
Tue Oct 19 16:50:21 CEST 2010
On 19.10.2010 18:31, Michael Niedermayer wrote:
> On Tue, Oct 19, 2010 at 05:51:55PM +0400, Anatoliy Nenashev wrote:
>> In some cases there is a situation when mjpeg decoder runaway from
>> allocated s->buffer.
>> Usually it happens in VLC decoder for DC-AC coefficients when input
>> frame is cirrupted.
>> In this case it is caused by "specific" garbage at the end of the memory
>> allocated for s->buffer.
>> Here is a fix to prevent this situation.
> i dont see how this would prevent overreading the buffer. And no i dont
> care that on your computer with your sample this week it works.
> unless you can show that this always works (which i doubt) its not
> a correct solution.
0xFF value aligned to byte is deprecated for VLC value because it is
used for markers. Thats why VLC decoder will stop within error when
intersects s->buffer_size position.
More information about the ffmpeg-devel