From e3fc47b713744dda0e2cec2fba3cc7628906aff7 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 25 Oct 2008 15:00:28 +0000 Subject: 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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27826 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libswscale') diff --git a/libswscale/swscale.c b/libswscale/swscale.c index a926bade05..62c0548fd5 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2312,7 +2312,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d #ifdef CONFIG_GPL /* yuv2bgr */ 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); } -- cgit v1.2.3