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
4b1fb32d
Commit
4b1fb32d
authored
Mar 25, 2014
by
Thomas Faber
Committed by
Alexandre Julliard
Mar 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx: Fix broken pointer arithmetic.
parent
d60910fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
dplayx_global.c
dlls/dplayx/dplayx_global.c
+5
-4
No files found.
dlls/dplayx/dplayx_global.c
View file @
4b1fb32d
...
...
@@ -84,8 +84,9 @@ static LPVOID lpSharedStaticData = NULL;
typedef
struct
{
BOOL
used
;
DWORD
data
[
dwBlockSize
-
sizeof
(
DWORD
)];
BYTE
data
[
dwBlockSize
-
sizeof
(
BOOL
)];
}
DPLAYX_MEM_SLICE
;
C_ASSERT
(
sizeof
(
DPLAYX_MEM_SLICE
)
==
dwBlockSize
);
static
DPLAYX_MEM_SLICE
*
lpMemArea
;
...
...
@@ -100,7 +101,7 @@ static void DPLAYX_PrivHeapFree( LPVOID addr )
return
;
}
lpAddrStart
=
(
char
*
)
addr
-
sizeof
(
DWORD
);
/* Find block header */
lpAddrStart
=
CONTAINING_RECORD
(
addr
,
DPLAYX_MEM_SLICE
,
data
);
/* Find block header */
dwBlockUsed
=
((
BYTE
*
)
lpAddrStart
-
(
BYTE
*
)
lpMemArea
)
/
dwBlockSize
;
lpMemArea
[
dwBlockUsed
].
used
=
FALSE
;
...
...
@@ -111,10 +112,10 @@ static LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size )
LPVOID
lpvArea
=
NULL
;
UINT
uBlockUsed
;
if
(
size
>
(
dwBlockSize
-
sizeof
(
DWORD
))
)
if
(
size
>
(
dwBlockSize
-
sizeof
(
BOOL
))
)
{
FIXME
(
"Size exceeded. Request of 0x%08x
\n
"
,
size
);
size
=
dwBlockSize
-
sizeof
(
DWORD
);
size
=
dwBlockSize
-
sizeof
(
BOOL
);
}
/* Find blank area */
...
...
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