From 813bc3bfcacfeed72b9b6cfdae6156b35ad4860b Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 13 Dec 2015 15:21:12 +0100 Subject: [PATCH] Fix some stack overflows in unit tests; found with asan. --- effect_chain_test.cpp | 2 +- gamma_compression_effect_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/effect_chain_test.cpp b/effect_chain_test.cpp index d79c933..596570c 100644 --- a/effect_chain_test.cpp +++ b/effect_chain_test.cpp @@ -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. diff --git a/gamma_compression_effect_test.cpp b/gamma_compression_effect_test.cpp index 6efbdea..1c87680 100644 --- a/gamma_compression_effect_test.cpp +++ b/gamma_compression_effect_test.cpp @@ -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); -- 2.39.2