Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
a72b4103
Commit
a72b4103
authored
Feb 22, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mxg: do not leak mxg->buffer
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
db05f7ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
mxg.c
libavformat/mxg.c
+6
-4
No files found.
libavformat/mxg.c
View file @
a72b4103
...
...
@@ -101,17 +101,19 @@ static int mxg_update_cache(AVFormatContext *s, unsigned int cache_size)
MXGContext
*
mxg
=
s
->
priv_data
;
unsigned
int
current_pos
=
mxg
->
buffer_ptr
-
mxg
->
buffer
;
unsigned
int
soi_pos
;
uint8_t
*
buffer
;
int
ret
;
/* reallocate internal buffer */
if
(
current_pos
>
current_pos
+
cache_size
)
return
AVERROR
(
ENOMEM
);
soi_pos
=
mxg
->
soi_ptr
-
mxg
->
buffer
;
mxg
->
buffer
=
av_fast_realloc
(
mxg
->
buffer
,
&
mxg
->
buffer_size
,
current_pos
+
cache_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
mxg
->
buffer
)
buffer
=
av_fast_realloc
(
mxg
->
buffer
,
&
mxg
->
buffer_size
,
current_pos
+
cache_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
buffer
)
return
AVERROR
(
ENOMEM
);
mxg
->
buffer
=
buffer
;
mxg
->
buffer_ptr
=
mxg
->
buffer
+
current_pos
;
if
(
mxg
->
soi_ptr
)
mxg
->
soi_ptr
=
mxg
->
buffer
+
soi_pos
;
...
...
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