https://git.reactos.org/?p=reactos.git;a=commitdiff;h=00cfa8aac20588f76544d368fea73d733d7f3adb

commit 00cfa8aac20588f76544d368fea73d733d7f3adb
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Sat Jan 4 13:56:11 2020 +0100
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Sat Nov 7 18:34:10 2020 +0100

    [WIN32K] Fix an ASSERT to ignore the upper 32 bits of a passed in GDI handle
---
 win32ss/gdi/ntgdi/gdiobj.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/win32ss/gdi/ntgdi/gdiobj.c b/win32ss/gdi/ntgdi/gdiobj.c
index ac268862ef5..e92c070b469 100644
--- a/win32ss/gdi/ntgdi/gdiobj.c
+++ b/win32ss/gdi/ntgdi/gdiobj.c
@@ -526,7 +526,10 @@ ENTRY_ReferenceEntryByHandle(HGDIOBJ hobj, FLONG fl)
 
     /* Integrity checks */
     ASSERT((pentry->FullUnique & 0x1f) == pentry->Objt);
-    ASSERT(pentry->einfo.pobj && pentry->einfo.pobj->hHmgr == hobj);
+    ASSERT(pentry->einfo.pobj != NULL);
+
+    /* Check if lower 32 bits match, the upper 32 bits are ignored */
+    ASSERT(pentry->einfo.pobj->hHmgr == UlongToPtr(PtrToUlong(hobj)));
 
     return pentry;
 }

Reply via email to