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
5f304e70
Commit
5f304e70
authored
Oct 31, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Avoid sizeof on structs with variable length array.
parent
b4712d2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
exticon.c
dlls/user32/exticon.c
+1
-4
No files found.
dlls/user32/exticon.c
View file @
5f304e70
...
...
@@ -216,9 +216,6 @@ static BYTE * ICO_LoadIcon( LPBYTE peimage, LPicoICONDIRENTRY lpiIDE, ULONG *uSi
*
* Reads .ico file and build phony ICONDIR struct
*/
#define HEADER_SIZE (sizeof(CURSORICONDIR) - sizeof (CURSORICONDIRENTRY))
#define HEADER_SIZE_FILE (sizeof(icoICONDIR) - sizeof (icoICONDIRENTRY))
static
BYTE
*
ICO_GetIconDirectory
(
LPBYTE
peimage
,
LPicoICONDIR
*
lplpiID
,
ULONG
*
uSize
)
{
CURSORICONDIR
*
lpcid
;
/* icon resource in resource-dir format */
...
...
@@ -233,7 +230,7 @@ static BYTE * ICO_GetIconDirectory( LPBYTE peimage, LPicoICONDIR* lplpiID, ULONG
return
0
;
/* allocate the phony ICONDIR structure */
*
uSize
=
lpcid
->
idCount
*
sizeof
(
CURSORICONDIRENTRY
)
+
HEADER_SIZE
;
*
uSize
=
FIELD_OFFSET
(
CURSORICONDIR
,
idEntries
[
lpcid
->
idCount
])
;
if
(
(
lpID
=
HeapAlloc
(
GetProcessHeap
(),
0
,
*
uSize
)
))
{
/* copy the header */
...
...
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