attrib: Avoid crash when called without parameter.

If attrib is called without any parameter the variable originalname
is used uninitialized.

Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5ec1524326)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
Bernhard Übelacker 2021-09-08 14:55:43 +02:00 committed by Michael Stefaniuc
parent cb8fde193b
commit d2392af664
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ int __cdecl wmain(int argc, WCHAR *argv[])
}
/* By default all files from current directory are taken into account */
lstrcpyW(name, L"*");
lstrcpyW(originalname, L".\\*");
while (i < argc) {
WCHAR *param = argv[i++];