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
435ac27d
Commit
435ac27d
authored
Jun 13, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wer: Use FIELD_OFFSET to calculate the size of a struct with variable length array.
parent
0f3085c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
main.c
dlls/wer/main.c
+1
-4
No files found.
dlls/wer/main.c
View file @
435ac27d
...
...
@@ -261,7 +261,6 @@ HRESULT WINAPI WerReportCloseHandle(HREPORT hreport)
HRESULT
WINAPI
WerReportCreate
(
PCWSTR
eventtype
,
WER_REPORT_TYPE
reporttype
,
PWER_REPORT_INFORMATION
reportinfo
,
HREPORT
*
phandle
)
{
report_t
*
report
;
DWORD
len
;
TRACE
(
"(%s, %d, %p, %p)
\n
"
,
debugstr_w
(
eventtype
),
reporttype
,
reportinfo
,
phandle
);
if
(
reportinfo
)
{
...
...
@@ -274,9 +273,7 @@ HRESULT WINAPI WerReportCreate(PCWSTR eventtype, WER_REPORT_TYPE reporttype, PWE
return
E_INVALIDARG
;
}
len
=
lstrlenW
(
eventtype
)
+
1
;
report
=
heap_alloc_zero
(
len
*
sizeof
(
WCHAR
)
+
sizeof
(
report_t
));
report
=
heap_alloc_zero
(
FIELD_OFFSET
(
report_t
,
eventtype
[
lstrlenW
(
eventtype
)
+
1
]));
if
(
!
report
)
return
__HRESULT_FROM_WIN32
(
ERROR_OUTOFMEMORY
);
...
...
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