Fix a stack buffer overrun in ycbcr_input_test.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 19 Feb 2017 15:55:33 +0000 (16:55 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 19 Feb 2017 15:55:33 +0000 (16:55 +0100)
ycbcr_input_test.cpp

index 33ec74c..413ac15 100644 (file)
@@ -1044,7 +1044,7 @@ TEST(EffectChainTest, MipmapGenerationWorks) {
        format.color_space = COLORSPACE_sRGB;
        format.gamma_curve = GAMMA_sRGB;
 
-       float out_data[width * height];
+       float out_data[width * height * 4];
        EffectChainTester tester(NULL, width, height);
        YCbCrInput *input = new YCbCrInput(format, ycbcr_format, width, height, YCBCR_INPUT_INTERLEAVED);
        input->set_pixel_data(0, ycbcr_data);