Browse Source

avfilter/formats: Alloc NULL fmts in SET_COMMON_FORMATS()

This avoids null pointer dereferences in case memory allocation has failed

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.5
Michael Niedermayer 10 years ago
parent
commit
b9ffafbfcc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavfilter/formats.c

+ 1
- 1
libavfilter/formats.c View File

@@ -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++) { \


Loading…
Cancel
Save