summaryrefslogtreecommitdiff
path: root/libavcodec/lagarith.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-30 14:27:04 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-30 14:27:33 +0100
commit61d43a265176e8e724301b7721affbe9f61729d5 (patch)
treee1a0910bb77cb5429bb4fa510fc457dd11e161e8 /libavcodec/lagarith.c
parentafd1245433e976f197acfd21550f1b60356b44a9 (diff)
downloadffmpeg-61d43a265176e8e724301b7721affbe9f61729d5.tar.gz
avcodec/lagarith: check and propagate return value from init_get_bits8()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/lagarith.c')
-rw-r--r--libavcodec/lagarith.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c
index 0e6bb01718..11d7791bfa 100644
--- a/libavcodec/lagarith.c
+++ b/libavcodec/lagarith.c
@@ -427,6 +427,7 @@ static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst,
GetBitContext gb;
lag_rac rac;
const uint8_t *src_end = src + src_size;
+ int ret;
rac.avctx = l->avctx;
l->zeros = 0;
@@ -444,7 +445,8 @@ static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst,
offset += 4;
}
- init_get_bits8(&gb, src + offset, src_size - offset);
+ if ((ret = init_get_bits8(&gb, src + offset, src_size - offset)) < 0)
+ return ret;
if (lag_read_prob_header(&rac, &gb) < 0)
return -1;