mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
avcodec/lagarith: check and propagate return value from init_get_bits8()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
afd1245433
commit
61d43a2651
@ -427,6 +427,7 @@ static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst,
|
|||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
lag_rac rac;
|
lag_rac rac;
|
||||||
const uint8_t *src_end = src + src_size;
|
const uint8_t *src_end = src + src_size;
|
||||||
|
int ret;
|
||||||
|
|
||||||
rac.avctx = l->avctx;
|
rac.avctx = l->avctx;
|
||||||
l->zeros = 0;
|
l->zeros = 0;
|
||||||
@ -444,7 +445,8 @@ static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst,
|
|||||||
offset += 4;
|
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)
|
if (lag_read_prob_header(&rac, &gb) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user