You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Do not attempt to use the unscaled yuv2rgb converter when height is odd because
it will overflow the buffer by 1 line. This might have been exploitable. Originally committed as revision 27826 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
@@ -2312,7 +2312,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
|
|||||||
#ifdef CONFIG_GPL
|
#ifdef CONFIG_GPL
|
||||||
/* yuv2bgr */
|
/* yuv2bgr */
|
||||||
if ((srcFormat==PIX_FMT_YUV420P || srcFormat==PIX_FMT_YUV422P) && (isBGR(dstFormat) || isRGB(dstFormat))
|
if ((srcFormat==PIX_FMT_YUV420P || srcFormat==PIX_FMT_YUV422P) && (isBGR(dstFormat) || isRGB(dstFormat))
|
||||||
&& !(flags & SWS_ACCURATE_RND))
|
&& !(flags & SWS_ACCURATE_RND) && !(dstH&1))
|
||||||
{
|
{
|
||||||
c->swScale= yuv2rgb_get_func_ptr(c);
|
c->swScale= yuv2rgb_get_func_ptr(c);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user