[FFmpeg-cvslog] indeo3: check return values of allocate_frame_buffers()

Michael Niedermayer git at videolan.org
Thu Dec 15 03:02:35 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Dec 15 01:30:38 2011 +0100| [cd645c15d8d91444e49aea589ace4d9f76210641] | committer: Michael Niedermayer

indeo3: check return values of allocate_frame_buffers()
Bug Found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd645c15d8d91444e49aea589ace4d9f76210641
---

 libavcodec/indeo3.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 1bb73fe..2c96662 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);
 }
 
 



More information about the ffmpeg-cvslog mailing list