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
a8175682
Commit
a8175682
authored
Nov 13, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed sign problem in GetWindowWord/Long check for offset larger than
the window extra bytes.
parent
85062e62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
win.c
windows/win.c
+4
-4
No files found.
windows/win.c
View file @
a8175682
...
...
@@ -1771,7 +1771,7 @@ WORD WINAPI GetWindowWord( HWND hwnd, INT offset )
SetLastError
(
ERROR_INVALID_WINDOW_HANDLE
);
return
0
;
}
if
(
offset
>
wndPtr
->
cbWndExtra
-
sizeof
(
WORD
))
if
(
offset
>
(
int
)(
wndPtr
->
cbWndExtra
-
sizeof
(
WORD
)
))
{
WARN
(
"Invalid offset %d
\n
"
,
offset
);
SetLastError
(
ERROR_INVALID_INDEX
);
...
...
@@ -1837,7 +1837,7 @@ WORD WINAPI SetWindowWord( HWND hwnd, INT offset, WORD newval )
return
0
;
}
if
(
offset
>
wndPtr
->
cbWndExtra
-
sizeof
(
WORD
))
if
(
offset
>
(
int
)(
wndPtr
->
cbWndExtra
-
sizeof
(
WORD
)
))
{
WARN
(
"Invalid offset %d
\n
"
,
offset
);
WIN_ReleasePtr
(
wndPtr
);
...
...
@@ -1916,7 +1916,7 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
if
(
offset
>=
0
)
{
if
(
offset
>
wndPtr
->
cbWndExtra
-
sizeof
(
LONG
))
if
(
offset
>
(
int
)(
wndPtr
->
cbWndExtra
-
sizeof
(
LONG
)
))
{
/*
* Some programs try to access last element from 16 bit
...
...
@@ -2005,7 +2005,7 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
if
(
offset
>=
0
)
{
LONG
*
ptr
=
(
LONG
*
)(((
char
*
)
wndPtr
->
wExtra
)
+
offset
);
if
(
offset
>
wndPtr
->
cbWndExtra
-
sizeof
(
LONG
))
if
(
offset
>
(
int
)(
wndPtr
->
cbWndExtra
-
sizeof
(
LONG
)
))
{
WARN
(
"Invalid offset %d
\n
"
,
offset
);
WIN_ReleasePtr
(
wndPtr
);
...
...
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