cmd.exe: Increase size of WCMD_HandleTildeModifiers() buffers to MAXSTRING.

Some buffers in WCMD_HandleTildeModifiers() are only of size MAX_PATH,
even though they handle strings that aren't necessarily
filenames. When changed to have size MAXSTRING, a stack overflow crash
with strings of size MAX_PATH stops happening.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42731
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Damjan Jovanovic 2020-11-13 18:09:59 +02:00 committed by Alexandre Julliard
parent ab1a979268
commit abe848f05f
1 changed files with 2 additions and 2 deletions

View File

@ -342,8 +342,8 @@ void WCMD_HandleTildeModifiers(WCHAR **start, BOOL atExecute)
};
WIN32_FILE_ATTRIBUTE_DATA fileInfo;
WCHAR outputparam[MAX_PATH];
WCHAR finaloutput[MAX_PATH];
WCHAR outputparam[MAXSTRING];
WCHAR finaloutput[MAXSTRING];
WCHAR fullfilename[MAX_PATH];
WCHAR thisoutput[MAX_PATH];
WCHAR *filepart = NULL;