aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-02 14:58:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-02 16:42:33 +0200
commitce4e57dbb51ac106a61fcd98330af9a619eea857 (patch)
tree7ccaa4ff84951666e13b3f35abca283c4eb37b47
parentfccde16afa3fe05b7aa1c176db3a5b042fa3c189 (diff)
downloadffmpeg-ce4e57dbb51ac106a61fcd98330af9a619eea857.tar.gz
avformat/sbgdec: Check alloc_array_elem() return value
Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/sbgdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c
index 23b7ea4489..03cd9226c9 100644
--- a/libavformat/sbgdec.c
+++ b/libavformat/sbgdec.c
@@ -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;