diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-05 00:22:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-05 00:37:20 +0100 |
commit | 5a8311513091ea7277578fbaf189e460dd1d4c7d (patch) | |
tree | 8e6acf9ee11477ad215156b3ce2aec736d0b0177 /libavcodec | |
parent | b77d94dc6cc60a8bc512897dc0e55dea78a5c390 (diff) | |
download | ffmpeg-5a8311513091ea7277578fbaf189e460dd1d4c7d.tar.gz |
ffv1: check for malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ffv1.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 074be4cfbb..29d76ed62e 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -123,6 +123,10 @@ av_cold int ffv1_init_slice_contexts(FFV1Context *f) int sxe = f->avctx->width * (sx + 1) / f->num_h_slices; int sys = f->avctx->height * sy / f->num_v_slices; int sye = f->avctx->height * (sy + 1) / f->num_v_slices; + + if (!fs) + return AVERROR(ENOMEM); + f->slice_context[i] = fs; memcpy(fs, f, sizeof(*fs)); memset(fs->rc_stat2, 0, sizeof(fs->rc_stat2)); |