Fix some stack overflows in unit tests; found with asan.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 13 Dec 2015 14:21:12 +0000 (15:21 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 13 Dec 2015 14:21:20 +0000 (15:21 +0100)
effect_chain_test.cpp
gamma_compression_effect_test.cpp

index d79c933..596570c 100644 (file)
@@ -951,7 +951,7 @@ TEST(EffectChainTest, SameInputsGiveSameOutputs) {
                0.0f, 0.0f,
                0.0f, 0.0f,
        };
-       float out_data[2 * 2];
+       float out_data[4 * 3];
        
        EffectChainTester tester(NULL, 4, 3);  // Note non-square aspect.
 
index 6efbdea..1c87680 100644 (file)
@@ -26,7 +26,7 @@ TEST(GammaCompressionEffectTest, sRGB_KeyValues) {
                0.040f, 0.041f,
                0.0f, 1.0f,
        };
-       float out_data[4];
+       float out_data[6];
        EffectChainTester tester(data, 2, 3, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR);
        tester.run(out_data, GL_RED, COLORSPACE_sRGB, GAMMA_sRGB);