summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-01-21 15:36:40 +0100
committerDave Airlie <airlied@redhat.com>2016-02-10 12:32:53 +1000
commitddb49b593125124cf63eefe24d8c4f6074c7b1ae (patch)
tree6c4c2eca6f00bb91c0daa53eddb0611a7915a960
parent0f01f30fb29285eb8073464a64fc2fb9a7b3d191 (diff)
vtest: ensure name is ending with 0
Always nice to have. Fix found thanks to american fuzzy lop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r--vtest/vtest_renderer.c2
1 files changed, 1 insertions, 1 deletions
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;