changeset 27792:3ebf88c5eb3d

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.
author michael
date Sat, 25 Oct 2008 15:00:28 +0000
parents 0215eb4439cc
children 446f24981781
files libswscale/swscale.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale.c	Sat Oct 25 13:13:17 2008 +0000
+++ b/libswscale/swscale.c	Sat Oct 25 15:00:28 2008 +0000
@@ -2312,7 +2312,7 @@
 #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);
         }