From d2392af66487fccb795e0a671aac06d41dc5c39c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= Date: Wed, 8 Sep 2021 14:55:43 +0200 Subject: [PATCH] attrib: Avoid crash when called without parameter. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If attrib is called without any parameter the variable originalname is used uninitialized. Signed-off-by: Bernhard Übelacker Signed-off-by: Alexandre Julliard (cherry picked from commit 5ec15243266b19970875770da1576d826d0be7a5) Signed-off-by: Michael Stefaniuc --- programs/attrib/attrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/attrib/attrib.c b/programs/attrib/attrib.c index 4813443449b..13fedad4e34 100644 --- a/programs/attrib/attrib.c +++ b/programs/attrib/attrib.c @@ -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++];