ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Wed Dec 31 
15:12:58 2014 +0100| [5ba62e89dfca540db03997668a8ec4571068d9e0] | committer: 
Michael Niedermayer

avcodec/loco: check the init_get_bits8() return code

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

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

 libavcodec/loco.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index 9b73598..aea478d 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -130,12 +130,15 @@ static int loco_decode_plane(LOCOContext *l, uint8_t 
*data, int width, int heigh
 {
     RICEContext rc;
     int val;
+    int ret;
     int i, j;
 
     if(buf_size<=0)
         return -1;
 
-    init_get_bits8(&rc.gb, buf, buf_size);
+    if ((ret = init_get_bits8(&rc.gb, buf, buf_size)) < 0)
+        return ret;
+
     rc.save  = 0;
     rc.run   = 0;
     rc.run2  = 0;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to