From 230dcf82c38148d4451b7952bef80ebe10ef4c4e Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Sat, 2 Sep 2017 12:57:42 +0100 Subject: [PATCH] test-display-base: Avoid global buffer overflow For some reasons (documented in cursor_init) the function uses 128 extra bytes of data causing a reading buffer overflow. Signed-off-by: Frediano Ziglio Acked-by: Christophe Fergeau --- server/tests/test-display-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/tests/test-display-base.c b/server/tests/test-display-base.c index abb7d813..3f49727e 100644 --- a/server/tests/test-display-base.c +++ b/server/tests/test-display-base.c @@ -694,7 +694,7 @@ static void release_resource(SPICE_GNUC_UNUSED QXLInstance *qin, static struct { QXLCursor cursor; - uint8_t data[CURSOR_WIDTH * CURSOR_HEIGHT * 4]; // 32bit per pixel + uint8_t data[CURSOR_WIDTH * CURSOR_HEIGHT * 4 + 128]; // 32bit per pixel } cursor; static void cursor_init(void)