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
bcc94328
Commit
bcc94328
authored
Feb 25, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt: check the return values of av_get_token for ENOMEM.
parent
dfcbe8cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
opt.c
libavutil/opt.c
+7
-0
No files found.
libavutil/opt.c
View file @
bcc94328
...
@@ -562,9 +562,16 @@ static int parse_key_value_pair(void *ctx, const char **buf,
...
@@ -562,9 +562,16 @@ static int parse_key_value_pair(void *ctx, const char **buf,
char
*
val
;
char
*
val
;
int
ret
;
int
ret
;
if
(
!
key
)
return
AVERROR
(
ENOMEM
);
if
(
*
key
&&
strspn
(
*
buf
,
key_val_sep
))
{
if
(
*
key
&&
strspn
(
*
buf
,
key_val_sep
))
{
(
*
buf
)
++
;
(
*
buf
)
++
;
val
=
av_get_token
(
buf
,
pairs_sep
);
val
=
av_get_token
(
buf
,
pairs_sep
);
if
(
!
val
)
{
av_freep
(
&
key
);
return
AVERROR
(
ENOMEM
);
}
}
else
{
}
else
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Missing key or no key/value separator found after key '%s'
\n
"
,
key
);
av_log
(
ctx
,
AV_LOG_ERROR
,
"Missing key or no key/value separator found after key '%s'
\n
"
,
key
);
av_free
(
key
);
av_free
(
key
);
...
...
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