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
3fead8fa
Commit
3fead8fa
authored
Feb 15, 2002
by
Jukka Heinonen
Committed by
Alexandre Julliard
Feb 15, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert some invalid offsets in GetWindowLong16 into valid offsets.
parent
0f9013f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
win.c
windows/win.c
+18
-0
No files found.
windows/win.c
View file @
3fead8fa
...
@@ -1873,6 +1873,24 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
...
@@ -1873,6 +1873,24 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
{
{
if
(
offset
>
wndPtr
->
cbWndExtra
-
sizeof
(
LONG
))
if
(
offset
>
wndPtr
->
cbWndExtra
-
sizeof
(
LONG
))
{
{
/*
* Some programs try to access last element from 16 bit
* code using illegal offset value. Hopefully this is
* what those programs really expect.
*/
if
(
type
==
WIN_PROC_16
&&
wndPtr
->
cbWndExtra
>=
4
&&
offset
==
wndPtr
->
cbWndExtra
-
sizeof
(
WORD
))
{
INT
offset2
=
wndPtr
->
cbWndExtra
-
sizeof
(
LONG
);
ERR
(
"- replaced invalid offset %d with %d
\n
"
,
offset
,
offset2
);
retvalue
=
*
(
LONG
*
)(((
char
*
)
wndPtr
->
wExtra
)
+
offset2
);
WIN_ReleasePtr
(
wndPtr
);
return
retvalue
;
}
WARN
(
"Invalid offset %d
\n
"
,
offset
);
WARN
(
"Invalid offset %d
\n
"
,
offset
);
WIN_ReleasePtr
(
wndPtr
);
WIN_ReleasePtr
(
wndPtr
);
SetLastError
(
ERROR_INVALID_INDEX
);
SetLastError
(
ERROR_INVALID_INDEX
);
...
...
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