[FFmpeg-cvslog] r27826 - trunk/libswscale/swscale.c

michael subversion
Sat Oct 25 17:00:28 CEST 2008


Author: michael
Date: Sat Oct 25 17:00:28 2008
New Revision: 27826

Log:
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.


Modified:
   trunk/libswscale/swscale.c

Modified: trunk/libswscale/swscale.c
==============================================================================
--- trunk/libswscale/swscale.c	(original)
+++ trunk/libswscale/swscale.c	Sat Oct 25 17:00:28 2008
@@ -2312,7 +2312,7 @@ SwsContext *sws_getContext(int srcW, int
 #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);
         }




More information about the ffmpeg-cvslog mailing list