[FFmpeg-devel] [PATCH] swscale: avoid overread in planar2x

Ramiro Polla ramiro.polla
Sun Sep 12 05:11:58 CEST 2010


The MMX2/3dnow code in planar2x in rgb2rgb currently reads one byte
prior to the source buffer. This leads to a crash on Windows and Mac
OS X when the buffer is allocated on the beginning of a page. This
should also be a problem on Linux but I haven't seen many crashes
because of overreading...

It does involve a 0.8% slowdown though. If this slowdown is not
acceptable, I wonder if we can add a configure option that will enable
the user to avoid overreads at the cost of suffering a little slowdown
(like --enable-avoid-overreads). There are other places that assume a
small overread is not a problem, but end up crashing on Windows and
Mac OS X.

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avoid_overread.diff
Type: text/x-patch
Size: 678 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100912/53a40d99/attachment.bin>

More information about the ffmpeg-devel mailing list