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
7ab71039
Commit
7ab71039
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 AVIFILE_AddFrame().
Perhaps the code should also just double the buffer. I can send another patch for that if needed.
parent
63aa5418
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
avifile.c
dlls/avifil32/avifile.c
+13
-9
No files found.
dlls/avifil32/avifile.c
View file @
7ab71039
...
...
@@ -1383,16 +1383,20 @@ static HRESULT AVIFILE_AddFrame(IAVIStreamImpl *This, DWORD ckid, DWORD size, DW
}
if
(
This
->
idxFmtChanges
==
NULL
||
This
->
nIdxFmtChanges
<=
This
->
sInfo
.
dwFormatChangeCount
)
{
This
->
nIdxFmtChanges
+=
16
;
if
(
This
->
idxFmtChanges
==
NULL
)
This
->
idxFmtChanges
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
nIdxFmtChanges
*
sizeof
(
AVIINDEXENTRY
));
else
DWORD
new_count
=
This
->
nIdxFmtChanges
+
16
;
void
*
new_buffer
;
if
(
This
->
idxFmtChanges
==
NULL
)
{
This
->
idxFmtChanges
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
idxFmtChanges
,
This
->
nIdxFmtChanges
*
sizeof
(
AVIINDEXENTRY
));
if
(
This
->
idxFmtChanges
==
NULL
)
return
AVIERR_MEMORY
;
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
new_count
*
sizeof
(
AVIINDEXENTRY
));
if
(
!
This
->
idxFmtChanges
)
return
AVIERR_MEMORY
;
}
else
{
new_buffer
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
idxFmtChanges
,
new_count
*
sizeof
(
AVIINDEXENTRY
));
if
(
!
new_buffer
)
return
AVIERR_MEMORY
;
This
->
idxFmtChanges
=
new_buffer
;
}
This
->
nIdxFmtChanges
=
new_count
;
}
This
->
sInfo
.
dwFlags
|=
AVISTREAMINFO_FORMATCHANGES
;
...
...
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