[PATCH] kernel32: Fix handling of empty file name parameters.

Changping Yu dead.ash at hotmail.com
Mon Jun 22 20:20:29 CDT 2020


-------------- next part --------------
>From 0e42f8d17def7aabadc403b8ac1c9697810d44fb Mon Sep 17 00:00:00 2001
From: Changping Yu <dead.ash at hotmail.com>
Date: Tue, 23 Jun 2020 08:57:43 +0800
Subject: [PATCH] kernel32: Fix handling of empty file name parameters.

Signed-off-by: Changping Yu <dead.ash at hotmail.com>
---
 dlls/kernel32/profile.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c
index f7d64f16a5..d5b6a9067c 100644
--- a/dlls/kernel32/profile.c
+++ b/dlls/kernel32/profile.c
@@ -1228,6 +1228,8 @@ UINT WINAPI GetPrivateProfileIntW( LPCWSTR section, LPCWSTR entry,
     UNICODE_STRING bufferW;
     ULONG result;
 
+    if (filename == NULL) return 0;
+
     if (GetPrivateProfileStringW( section, entry, emptystringW, buffer, ARRAY_SIZE( buffer ),
                                   filename ) == 0)
         return def_val;
-- 
2.27.0.windows.1



More information about the wine-devel mailing list