https://git.reactos.org/?p=reactos.git;a=commitdiff;h=84b09285c8405778ca9e5e...
commit 84b09285c8405778ca9e5ebe07c537a38067eeae Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Sat Dec 3 10:27:33 2022 +0200 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Tue Dec 13 07:18:24 2022 +0100
[WIN32K] Fix missing NULL check in NtGdiPathToRegion --- win32ss/gdi/ntgdi/path.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/win32ss/gdi/ntgdi/path.c b/win32ss/gdi/ntgdi/path.c index 37b82ad5a7d..6962e5497b1 100644 --- a/win32ss/gdi/ntgdi/path.c +++ b/win32ss/gdi/ntgdi/path.c @@ -2893,6 +2893,14 @@ NtGdiPathToRegion(HDC hDC) hrgnRval = Rgn->BaseObject.hHmgr;
pNewPath = PATH_FlattenPath(pPath); + if (pNewPath == NULL) + { + ERR("Failed to flatten path %p\n", pDc->dclevel.hPath); + REGION_Delete(Rgn); + PATH_UnlockPath(pPath); + DC_UnlockDc(pDc); + return NULL; + }
Ret = PATH_PathToRegion(pNewPath, pdcattr->jFillMode, Rgn);