Commit ce4e57db authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/sbgdec: Check alloc_array_elem() return value

Reviewed-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent fccde16a
......@@ -973,6 +973,8 @@ static int expand_tseq(void *log, struct sbg_script *s, int *nb_ev_max,
} else {
ev = alloc_array_elem((void **)&s->events, sizeof(*ev),
&s->nb_events, nb_ev_max);
if (!ev)
return AVERROR(ENOMEM);
ev->ts = tseq->ts.t;
ev->elements = def->elements;
ev->nb_elements = def->nb_elements;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment