[FFmpeg-devel] [PATCH 04/19] snowdec: fix return value for small overreads.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jul 29 17:58:53 CEST 2012


On Sun, Jul 29, 2012 at 05:41:04PM +0200, Nicolas George wrote:
> Le duodi 12 thermidor, an CCXX, Reimar Döffinger a écrit :
> > Maybe we should just handle that in the wrapper function?
> 
> I hesitate about that. My opinion is that code that relies on small
> overreads is fragile, so it can be a good idea have a strict check for all
> decoders (that is patch #19, enabled only at assert-level 2), and add this
> kind of correction in decoders that are known to rely on overreads.

It would be possible to mark which decoders can validly overread.
Though I wonder, do those decoders really overread for valid, undamaged input?
That seems strange to me.
If it happens only for damaged input those decoders should probably mark
an error somehow.


More information about the ffmpeg-devel mailing list