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
c6e1966c
Commit
c6e1966c
authored
Feb 13, 2018
by
Fan Gang
Committed by
Paul B Mahol
Dec 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/ass_split: fix a memory leak defect when realloc fails
Fixes #7019.
parent
ddefd055
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ass_split.c
libavcodec/ass_split.c
+3
-3
No files found.
libavcodec/ass_split.c
View file @
c6e1966c
...
...
@@ -249,7 +249,7 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf)
const
ASSSection
*
section
=
&
ass_sections
[
ctx
->
current_section
];
int
*
number
=
&
ctx
->
field_number
[
ctx
->
current_section
];
int
*
order
=
ctx
->
field_order
[
ctx
->
current_section
];
int
*
tmp
,
i
,
len
;
int
i
,
len
;
while
(
buf
&&
*
buf
)
{
if
(
buf
[
0
]
==
'['
)
{
...
...
@@ -280,9 +280,9 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf)
while
(
!
is_eol
(
*
buf
))
{
buf
=
skip_space
(
buf
);
len
=
strcspn
(
buf
,
",
\r\n
"
);
if
(
!
(
tmp
=
av_realloc_array
(
order
,
(
*
number
+
1
),
sizeof
(
*
order
)))
)
if
(
av_reallocp_array
(
&
order
,
(
*
number
+
1
),
sizeof
(
*
order
))
!=
0
)
return
NULL
;
order
=
tmp
;
order
[
*
number
]
=
-
1
;
for
(
i
=
0
;
section
->
fields
[
i
].
name
;
i
++
)
if
(
!
strncmp
(
buf
,
section
->
fields
[
i
].
name
,
len
))
{
...
...
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