git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75819fa
)
avfilter/formats: Alloc NULL fmts in SET_COMMON_FORMATS()
author
Michael Niedermayer
<michaelni@gmx.at>
Fri, 21 Nov 2014 21:15:32 +0000
(22:15 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Fri, 21 Nov 2014 21:15:32 +0000
(22:15 +0100)
This avoids null pointer dereferences in case memory allocation has failed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/formats.c
patch
|
blob
|
history
diff --git
a/libavfilter/formats.c
b/libavfilter/formats.c
index
42afcf4
..
eb3b87a
100644
(file)
--- a/
libavfilter/formats.c
+++ b/
libavfilter/formats.c
@@
-494,7
+494,7
@@
void ff_formats_changeref(AVFilterFormats **oldref, AVFilterFormats **newref)
}
#define SET_COMMON_FORMATS(ctx, fmts, in_fmts, out_fmts, ref, list) \
-
{
\
+
if (fmts) {
\
int count = 0, i; \
\
for (i = 0; i < ctx->nb_inputs; i++) { \