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>
This commit is contained in:
Chris Wilson 2013-09-05 17:48:20 +01:00
parent e6bb553b74
commit f01c5eae2a
1 changed files with 1 additions and 1 deletions

View File

@ -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",