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

Michael Niedermayer michaelni
Sun Sep 12 12:12:35 CEST 2010


On Sun, Sep 12, 2010 at 10:25:35AM +0100, M?ns Rullg?rd wrote:
> Ramiro Polla <ramiro.polla at gmail.com> writes:
> 
> > Hi,
> >
> > 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.
> 
> The correct solution is usually to allocate a little extra.

not if the value of the read outside byte affect the output and thus
regression testability

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100912/871c9797/attachment.pgp>



More information about the ffmpeg-devel mailing list