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
d7cb5a8d
Commit
d7cb5a8d
authored
Sep 09, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg_filter: fix unsafe snprintf() usage
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
1fc3e8f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
ffmpeg_filter.c
ffmpeg_filter.c
+4
-5
No files found.
ffmpeg_filter.c
View file @
d7cb5a8d
...
...
@@ -424,18 +424,17 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
if
(
sample_fmts
||
sample_rates
||
channel_layouts
)
{
AVFilterContext
*
format
;
char
args
[
256
];
int
len
=
0
;
args
[
0
]
=
0
;
if
(
sample_fmts
)
len
+=
snprintf
(
args
+
len
,
sizeof
(
args
)
-
len
,
"sample_fmts=%s:"
,
av_strlcatf
(
args
,
sizeof
(
args
)
,
"sample_fmts=%s:"
,
sample_fmts
);
if
(
sample_rates
)
len
+=
snprintf
(
args
+
len
,
sizeof
(
args
)
-
len
,
"sample_rates=%s:"
,
av_strlcatf
(
args
,
sizeof
(
args
)
,
"sample_rates=%s:"
,
sample_rates
);
if
(
channel_layouts
)
len
+=
snprintf
(
args
+
len
,
sizeof
(
args
)
-
len
,
"channel_layouts=%s:"
,
av_strlcatf
(
args
,
sizeof
(
args
)
,
"channel_layouts=%s:"
,
channel_layouts
);
args
[
len
-
1
]
=
0
;
av_freep
(
&
sample_fmts
);
av_freep
(
&
sample_rates
);
...
...
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