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
c3bd1d60
Commit
c3bd1d60
authored
Mar 12, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formats: Check memory allocations
parent
5a2645ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
formats.c
libavfilter/formats.c
+10
-1
No files found.
libavfilter/formats.c
View file @
c3bd1d60
...
...
@@ -171,8 +171,15 @@ AVFilterFormats *ff_make_format_list(const int *fmts)
;
formats
=
av_mallocz
(
sizeof
(
*
formats
));
if
(
count
)
if
(
!
formats
)
return
NULL
;
if
(
count
)
{
formats
->
formats
=
av_malloc
(
sizeof
(
*
formats
->
formats
)
*
count
);
if
(
!
formats
->
formats
)
{
av_freep
(
&
formats
);
return
NULL
;
}
}
formats
->
nb_formats
=
count
;
memcpy
(
formats
->
formats
,
fmts
,
sizeof
(
*
formats
->
formats
)
*
count
);
...
...
@@ -257,6 +264,8 @@ AVFilterChannelLayouts *ff_all_channel_layouts(void)
do { \
*ref = f; \
f->refs = av_realloc(f->refs, sizeof(*f->refs) * ++f->refcount); \
if (!f->refs) \
return; \
f->refs[f->refcount-1] = ref; \
} while (0)
...
...
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