diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-05 17:48:20 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-05 17:48:20 +0100 |
commit | f01c5eae2a3d6efebe9332a8654303356e622bec (patch) | |
tree | 6b19e2d1e069ced189222149c6c695a0001e77a5 /tools | |
parent | e6bb553b7482de4d52b6914e8eac09f2e6014714 (diff) |
intel-virtual-output: Reserve space for the '\0' in the sprintf
Even though we don't use the trailing NUL byte for our comparisons,
sprintf will write it, so we need make space for it.
Reported-by: Severin Strobl <fd@severin-strobl.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68987
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/virtual.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/virtual.c b/tools/virtual.c index 8e241e53..41bc36e5 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -2041,7 +2041,7 @@ static int first_display_wait_for_ack(struct context *ctx, int timeout, int id) { struct display *display = ctx->display; struct pollfd pfd; - char expect[5]; + char expect[6]; /* "1234R\0" */ sprintf(expect, "%04xR", id); DBG(("%s: wait for act '%c%c%c%c%c'\n", |