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
d34aba2a
Commit
d34aba2a
authored
Jan 05, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avifil32: Don't leak the buffer on HeapReAlloc() failure in AVISaveOptionsFmtChoose().
parent
7ab71039
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
api.c
dlls/avifil32/api.c
+4
-3
No files found.
dlls/avifil32/api.c
View file @
d34aba2a
...
@@ -1225,13 +1225,14 @@ static BOOL AVISaveOptionsFmtChoose(HWND hWnd)
...
@@ -1225,13 +1225,14 @@ static BOOL AVISaveOptionsFmtChoose(HWND hWnd)
acmMetrics
(
NULL
,
ACM_METRIC_MAX_SIZE_FORMAT
,
&
size
);
acmMetrics
(
NULL
,
ACM_METRIC_MAX_SIZE_FORMAT
,
&
size
);
if
((
pOptions
->
cbFormat
==
0
||
pOptions
->
lpFormat
==
NULL
)
&&
size
!=
0
)
{
if
((
pOptions
->
cbFormat
==
0
||
pOptions
->
lpFormat
==
NULL
)
&&
size
!=
0
)
{
pOptions
->
lpFormat
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
pOptions
->
lpFormat
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
pOptions
->
lpFormat
)
return
FALSE
;
pOptions
->
cbFormat
=
size
;
pOptions
->
cbFormat
=
size
;
}
else
if
(
pOptions
->
cbFormat
<
(
DWORD
)
size
)
{
}
else
if
(
pOptions
->
cbFormat
<
(
DWORD
)
size
)
{
pOptions
->
lpFormat
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
pOptions
->
lpFormat
,
size
);
void
*
new_buffer
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
pOptions
->
lpFormat
,
size
);
if
(
!
new_buffer
)
return
FALSE
;
pOptions
->
lpFormat
=
new_buffer
;
pOptions
->
cbFormat
=
size
;
pOptions
->
cbFormat
=
size
;
}
}
if
(
pOptions
->
lpFormat
==
NULL
)
return
FALSE
;
afmtc
.
pwfx
=
pOptions
->
lpFormat
;
afmtc
.
pwfx
=
pOptions
->
lpFormat
;
afmtc
.
cbwfx
=
pOptions
->
cbFormat
;
afmtc
.
cbwfx
=
pOptions
->
cbFormat
;
...
...
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