From e85d3c7108668b4dcc75eb45d20895ee3aa7d005 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 10 Jul 2013 08:26:14 +0200 Subject: [PATCH] cmd: null terminate answer string (Coverity). --- programs/cmd/builtins.c | 1 + 1 file changed, 1 insertion(+) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index aa1e7d4d099..64e12a0bcfc 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -400,6 +400,7 @@ void WCMD_choice (const WCHAR * args) { while (TRUE) { /* FIXME: Add support for option /T */ + answer[1] = 0; /* terminate single character string */ WCMD_ReadFile(GetStdHandle(STD_INPUT_HANDLE), answer, 1, &count); if (!opt_s)