swscale: increase yuv2rgb table headroom
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Dec 2014 21:21:21 +0000 (22:21 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Mar 2015 17:03:49 +0000 (18:03 +0100)
Fixes out of array access
Fixes: case2_bad_read_yuv2rgbx32.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswscale/swscale_internal.h

index 3def1b6..b2f844f 100644 (file)
@@ -34,7 +34,7 @@
 
 #define STR(s) AV_TOSTRING(s) // AV_STRINGIFY is too long
 
-#define YUVRGB_TABLE_HEADROOM 128
+#define YUVRGB_TABLE_HEADROOM 256
 
 #define FAST_BGR2YV12 // use 7-bit instead of 15-bit coefficients