[FFmpeg-cvslog] avcodec/bfi: check for malloc failure
Piotr Bandurski
git at videolan.org
Sat Sep 14 17:57:00 CEST 2013
ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Sat Sep 14 13:54:10 2013 +0200| [1a3d142f1f1e65f554cba84d8a515684ecb390d0] | committer: Michael Niedermayer
avcodec/bfi: check for malloc failure
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a3d142f1f1e65f554cba84d8a515684ecb390d0
---
libavcodec/bfi.c | 2 ++
1 file changed, 2 insertions(+)
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;
}
More information about the ffmpeg-cvslog
mailing list