History

avfilter/vsrc_mandelbrot: Check for malloc failure

Michael Niedermayer committed 4 years ago

Commit fbd22501 parent 70db1431 file · +3 −0Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vsrc_mandelbrot.c+3−0
@@ -134,6 +134,9 @@ static av_cold int init(AVFilterContext *ctx) · 133 unmodified lines
134134 s-> next_cache= av_malloc_array(s->cache_allocated, sizeof(*s-> next_cache));
135135 s-> zyklus = av_malloc_array(s->maxiter + 16, sizeof(*s->zyklus));
136136
137+ if (!s->point_cache || !s->next_cache || !s->zyklus)
138+ return AVERROR(ENOMEM);
139+
137140 return 0;
138141 }
139142

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t