summaryrefslogtreecommitdiff
path: root/libavcodec/indeo3.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-15 01:30:38 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-15 01:30:38 +0100
commitcd645c15d8d91444e49aea589ace4d9f76210641 (patch)
tree429fc8c81dd02991aaf19d50b7078e4956958abd /libavcodec/indeo3.c
parent8b9b6332dfeb169098c8ab1351d66fc5b474dd55 (diff)
indeo3: check return values of allocate_frame_buffers()
Bug Found by: Diana Elena Muscalu Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo3.c')
-rw-r--r--libavcodec/indeo3.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 1bb73fe790..2c966624dd 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -884,7 +884,8 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
ctx->height = height;
free_frame_buffers(ctx);
- allocate_frame_buffers(ctx, avctx);
+ if(allocate_frame_buffers(ctx, avctx) < 0)
+ return AVERROR_INVALIDDATA;
avcodec_set_dimensions(avctx, width, height);
}
@@ -984,9 +985,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
dsputil_init(&ctx->dsp, avctx);
- allocate_frame_buffers(ctx, avctx);
-
- return 0;
+ return allocate_frame_buffers(ctx, avctx);
}