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:
parent
e6bb553b74
commit
f01c5eae2a
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue