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:
parent
27f80dab77
commit
0d4c399623
|
@ -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':
|
||||
|
|
Loading…
Reference in New Issue