mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 17:14:32 +00:00
[SHLWAPI] Follow-up of #2430
Add a NULL check in SHLockSharedEx function. CORE-13950
This commit is contained in:
parent
23f6b36174
commit
5a440b2d90
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue