Module: libav Branch: release/9 Commit: 969028870c6f5a2ed953bfca8cb68c24ffd9c824
Author: Anton Khirnov <[email protected]> Committer: Sean McGovern <[email protected]> Date: Thu Nov 28 10:54:35 2013 +0100 cavsdec: check ff_get_buffer() return value Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:[email protected] --- libavcodec/cavsdec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 15a05c8..c68f7b2 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -928,6 +928,7 @@ static inline int check_for_slice(AVSContext *h) static int decode_pic(AVSContext *h) { + int ret; int skip_count = -1; enum cavs_mb mb_type; @@ -965,7 +966,9 @@ static int decode_pic(AVSContext *h) if (h->cur.f->data[0]) h->avctx->release_buffer(h->avctx, h->cur.f); - ff_get_buffer(h->avctx, h->cur.f); + ret = ff_get_buffer(h->avctx, h->cur.f); + if (ret < 0) + return ret; if (!h->edge_emu_buffer) { int alloc_size = FFALIGN(FFABS(h->cur.f->linesize[0]) + 32, 32); _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
