]> git.sesse.net Git - movit/commitdiff
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 d79c933431cdaa2d8c5f78924a970748a3f66fa4..596570c67dd3dc6858ea0815c7202d1e50936c67 100644 (file)
@@ -951,7 +951,7 @@ TEST(EffectChainTest, SameInputsGiveSameOutputs) {
                0.0f, 0.0f,
                0.0f, 0.0f,
        };
                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.
 
        
        EffectChainTester tester(NULL, 4, 3);  // Note non-square aspect.
 
index 6efbdea0944211a82e157518b616fb71b0cdf0a1..1c8768096b6485d5b6d260ae13ca0e49235dd967 100644 (file)
@@ -26,7 +26,7 @@ TEST(GammaCompressionEffectTest, sRGB_KeyValues) {
                0.040f, 0.041f,
                0.0f, 1.0f,
        };
                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);
 
        EffectChainTester tester(data, 2, 3, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR);
        tester.run(out_data, GL_RED, COLORSPACE_sRGB, GAMMA_sRGB);