Message ID | 20220421204512.21908-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | fbd22504c4148d2a01ccfe38df26c144f56db76b |
Headers | show |
Series | [FFmpeg-devel] avfilter/vsrc_mandelbrot: Check for malloc failure | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_aarch64_jetson | success | Make finished |
andriy/make_fate_aarch64_jetson | success | Make fate finished |
andriy/make_armv7_RPi4 | success | Make finished |
andriy/make_fate_armv7_RPi4 | success | Make fate finished |
LGTM
On Fri, Apr 22, 2022 at 11:52:36AM +0200, Paul B Mahol wrote:
> LGTM
will apply
thx
[...]
diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c index 20f62ed42e..d4d7e2fa49 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; }
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavfilter/vsrc_mandelbrot.c | 3 +++ 1 file changed, 3 insertions(+)