cmd: Avoid potential buffer overflow (Coverity).

Signed-off-by: Marcus Meissner <marcus@jet.franken.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Marcus Meissner 2016-06-18 09:50:59 +02:00 committed by Alexandre Julliard
parent 27f80dab77
commit 0d4c399623
1 changed files with 1 additions and 1 deletions

View File

@ -375,7 +375,7 @@ static void WCMD_show_prompt (void) {
*q++ = '(';
break;
case 'D':
GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, q, MAX_PATH);
GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, q, MAX_PATH - (q - out_string));
while (*q) q++;
break;
case 'E':