[libav-commits] exr: check return value

Vittorio Giovara git at libav.org
Fri Nov 14 20:32:40 CET 2014


Module: libav
Branch: master
Commit: 3a6ddfb8745e4b306a5637927fb057f630345e2f

Author:    Vittorio Giovara <vittorio.giovara at gmail.com>
Committer: Vittorio Giovara <vittorio.giovara at gmail.com>
Date:      Wed Nov 12 19:10:45 2014 +0100

exr: check return value

CC: libav-stable at libav.org
Bug-Id: CID 1198259

---

 libavcodec/exr.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 37a31ce..4aa6eaf 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -311,8 +311,9 @@ static int huf_unpack_enc_table(GetByteContext *gb,
                                 int32_t im, int32_t iM, uint64_t *hcode)
 {
     GetBitContext gbit;
-
-    init_get_bits8(&gbit, gb->buffer, bytestream2_get_bytes_left(gb));
+    int ret = init_get_bits8(&gbit, gb->buffer, bytestream2_get_bytes_left(gb));
+    if (ret < 0)
+        return ret;
 
     for (; im <= iM; im++) {
         uint64_t l = hcode[im] = get_bits(&gbit, 6);



More information about the libav-commits mailing list