[Piglit] [PATCH v3] shader_runner: make buffer large enough to fit any GL enum

Sandra Koroniewska sandra.koroniewska at gmail.com
Thu Mar 2 17:03:50 UTC 2017


This fixes a buffer overflow in spec/arb_shader_image_load_store/execution/disable_early_z.shader_test
---
 tests/shaders/shader_runner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 89e6e0a5a..bbc181724 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -2821,7 +2821,7 @@ piglit_display(void)
 		double d[4];
 		int x, y, z, w, h, l, tex, level;
 		unsigned ux, uy;
-		char s[32];
+		char s[73]; // 73 for longest possible content (gl_framebuffer_incomplete_insufficient_shader_combined_local_storage_ext)
 		enum piglit_result result = PIGLIT_PASS;
 
 		parse_whitespace(next_line, &line);
-- 
2.11.0.windows.1



More information about the Piglit mailing list