From ddb49b593125124cf63eefe24d8c4f6074c7b1ae Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 21 Jan 2016 15:36:40 +0100 Subject: vtest: ensure name is ending with 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Always nice to have. Fix found thanks to american fuzzy lop. Signed-off-by: Marc-André Lureau --- vtest/vtest_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vtest/vtest_renderer.c b/vtest/vtest_renderer.c index a4eba32..58d10d9 100644 --- a/vtest/vtest_renderer.c +++ b/vtest/vtest_renderer.c @@ -124,7 +124,7 @@ int vtest_create_renderer(int in_fd, int out_fd, uint32_t length) return -1; } - vtestname = malloc(length); + vtestname = calloc(1, length + 1); if (!vtestname) return -1; -- cgit v1.2.3