summaryrefslogtreecommitdiffstats
path: root/libavcodec/bfi.c
diff options
context:
space:
mode:
authorPiotr Bandurski <ami_stuff@o2.pl>2013-09-14 13:54:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-14 17:35:48 +0200
commit1a3d142f1f1e65f554cba84d8a515684ecb390d0 (patch)
tree394edd8a71142845609fa5ae24404f105c05e36b /libavcodec/bfi.c
parentbb5e7d3b5ad21cefee5a1d1e895f01f70ea9a5d0 (diff)
downloadffmpeg-streaming-1a3d142f1f1e65f554cba84d8a515684ecb390d0.zip
ffmpeg-streaming-1a3d142f1f1e65f554cba84d8a515684ecb390d0.tar.gz
avcodec/bfi: check for malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/bfi.c')
-rw-r--r--libavcodec/bfi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/bfi.c b/libavcodec/bfi.c
index 9cfcd14..924d7f8 100644
--- a/libavcodec/bfi.c
+++ b/libavcodec/bfi.c
@@ -42,6 +42,8 @@ static av_cold int bfi_decode_init(AVCodecContext *avctx)
BFIContext *bfi = avctx->priv_data;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
bfi->dst = av_mallocz(avctx->width * avctx->height);
+ if (!bfi->dst)
+ return AVERROR(ENOMEM);
return 0;
}
OpenPOWER on IntegriCloud