Commit 0d4c3996 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

cmd: Avoid potential buffer overflow (Coverity).

parent 27f80dab
...@@ -375,7 +375,7 @@ static void WCMD_show_prompt (void) { ...@@ -375,7 +375,7 @@ static void WCMD_show_prompt (void) {
*q++ = '('; *q++ = '(';
break; break;
case 'D': 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++; while (*q) q++;
break; break;
case 'E': case 'E':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment