https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5a440b2d9014078e600fa…
commit 5a440b2d9014078e600fa2b97f32d5aa9c94d5d8
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Mar 11 07:36:07 2020 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Wed Mar 11 07:36:07 2020 +0900
[SHLWAPI] Follow-up of #2430
Add a NULL check in SHLockSharedEx function. CORE-13950
---
dll/win32/shlwapi/ordinal.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dll/win32/shlwapi/ordinal.c b/dll/win32/shlwapi/ordinal.c
index 8773234e2df..216e7e56a62 100644
--- a/dll/win32/shlwapi/ordinal.c
+++ b/dll/win32/shlwapi/ordinal.c
@@ -259,6 +259,8 @@ PVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId)
/* Get handle to shared memory for current process */
hDup = SHMapHandle(hShared, dwProcId, GetCurrentProcessId(), FILE_MAP_ALL_ACCESS, 0);
+ if (hDup == NULL)
+ return NULL;
/* Get View */
pMapped = MapViewOfFile(hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);