projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7246909
)
[COMCTL32] Add NULL checks to SetWindowSubclass.
author
Thomas Faber
<thomas.faber@reactos.org>
Sun, 3 Feb 2019 15:41:29 +0000
(16:41 +0100)
committer
Thomas Faber
<thomas.faber@reactos.org>
Sun, 17 Feb 2019 08:51:16 +0000
(09:51 +0100)
Imports Wine commit
04847e68f87
by Sven Baars.
Fixes crash in comctl32_winetest:subclass.
dll/win32/comctl32/commctrl.c
patch
|
blob
|
history
diff --git
a/dll/win32/comctl32/commctrl.c
b/dll/win32/comctl32/commctrl.c
index
d4cb73a
..
a3bbd5f
100644
(file)
--- a/
dll/win32/comctl32/commctrl.c
+++ b/
dll/win32/comctl32/commctrl.c
@@
-1266,6
+1266,9
@@
BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
TRACE ("(%p, %p, %lx, %lx)\n", hWnd, pfnSubclass, uIDSubclass, dwRef);
+ if (!hWnd || !pfnSubclass)
+ return FALSE;
+
/* Since the window procedure that we set here has two additional arguments,
* we can't simply set it as the new window procedure of the window. So we
* set our own window procedure and then calculate the other two arguments