mirror of
https://github.com/reactos/reactos.git
synced 2026-06-02 09:20:43 +08:00
[SHLWAPI] Follow-up of #2430
Add a NULL check in SHLockSharedEx function. CORE-13950
This commit is contained in:
@@ -259,6 +259,8 @@ PVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId)
|
|||||||
|
|
||||||
/* Get handle to shared memory for current process */
|
/* Get handle to shared memory for current process */
|
||||||
hDup = SHMapHandle(hShared, dwProcId, GetCurrentProcessId(), FILE_MAP_ALL_ACCESS, 0);
|
hDup = SHMapHandle(hShared, dwProcId, GetCurrentProcessId(), FILE_MAP_ALL_ACCESS, 0);
|
||||||
|
if (hDup == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
/* Get View */
|
/* Get View */
|
||||||
pMapped = MapViewOfFile(hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
pMapped = MapViewOfFile(hDup, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user