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

Nicolas George nicolas.george at normalesup.org
Sun Jul 29 17:41:04 CEST 2012

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.

Also, a less strict test could accept absurd return values that are not
overreads but just happen to be near enough the packet size.

> And also e.g. assert that the overread never is too large?

This version limits it to FF_INPUT_BUFFER_PADDING_SIZE (i.e. 16). Bigger
overreads are caught by patch #19.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120729/ee78f7f0/attachment.asc>

More information about the ffmpeg-devel mailing list