Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c362081a
Commit
c362081a
authored
May 19, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Moved the class extra bytes check to catch uninitialised data sooner.
parent
bd5c02e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
class.c
dlls/user32/class.c
+8
-13
No files found.
dlls/user32/class.c
View file @
c362081a
...
...
@@ -338,11 +338,6 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, HINSTANCE hInstance, BOOL local
/* Fix the extra bytes value */
if
(
classExtra
<
0
||
winExtra
<
0
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
NULL
;
}
if
(
classExtra
>
40
)
/* Extra bytes are limited to 40 in Win32 */
WARN
(
"Class extra bytes %d is > 40
\n
"
,
classExtra
);
if
(
winExtra
>
40
)
/* Extra bytes are limited to 40 in Win32 */
...
...
@@ -526,11 +521,11 @@ ATOM WINAPI RegisterClassExA( const WNDCLASSEXA* wc )
CLASS
*
classPtr
;
HINSTANCE
instance
;
if
(
wc
->
hInstance
==
user32_module
)
if
(
wc
->
cbClsExtra
<
0
||
wc
->
cbWndExtra
<
0
||
wc
->
hInstance
==
user32_module
)
/* we can't register a class for user32 */
{
/* we can't register a class for user32 */
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
if
(
!
(
instance
=
wc
->
hInstance
))
instance
=
GetModuleHandleW
(
NULL
);
...
...
@@ -575,11 +570,11 @@ ATOM WINAPI RegisterClassExW( const WNDCLASSEXW* wc )
CLASS
*
classPtr
;
HINSTANCE
instance
;
if
(
wc
->
hInstance
==
user32_module
)
if
(
wc
->
cbClsExtra
<
0
||
wc
->
cbWndExtra
<
0
||
wc
->
hInstance
==
user32_module
)
/* we can't register a class for user32 */
{
/* we can't register a class for user32 */
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
if
(
!
(
instance
=
wc
->
hInstance
))
instance
=
GetModuleHandleW
(
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment