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>
macos/master
Marc-André Lureau 9 years ago committed by Dave Airlie
parent 0f01f30fb2
commit ddb49b5931
  1. 2
      vtest/vtest_renderer.c

@ -124,7 +124,7 @@ int vtest_create_renderer(int in_fd, int out_fd, uint32_t length)
return -1; return -1;
} }
vtestname = malloc(length); vtestname = calloc(1, length + 1);
if (!vtestname) if (!vtestname)
return -1; return -1;

Loading…
Cancel
Save