diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-04-21 22:45:12 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-06-14 16:56:57 +0200 |
commit | 8775295080da8fc1a57493cb0e557366a65a0c0b (patch) | |
tree | d91fede1d369f400e2bfbf75d04f3b9c243345a0 | |
parent | 0a3a33311e7566e0e05ca98f97d1e4b45f37f08d (diff) | |
download | ffmpeg-8775295080da8fc1a57493cb0e557366a65a0c0b.tar.gz |
avfilter/vsrc_mandelbrot: Check for malloc failure
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fbd22504c4148d2a01ccfe38df26c144f56db76b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavfilter/vsrc_mandelbrot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c index 6ad108151f..11650e36f7 100644 --- a/libavfilter/vsrc_mandelbrot.c +++ b/libavfilter/vsrc_mandelbrot.c @@ -134,6 +134,9 @@ static av_cold int init(AVFilterContext *ctx) s-> next_cache= av_malloc_array(s->cache_allocated, sizeof(*s-> next_cache)); s-> zyklus = av_malloc_array(s->maxiter + 16, sizeof(*s->zyklus)); + if (!s->point_cache || !s->next_cache || !s->zyklus) + return AVERROR(ENOMEM); + return 0; } |