mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 17:55:21 +00:00
h264: fix overreads in cabac reader.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
parent
d360dd902c
commit
7374fac804
@ -47,7 +47,8 @@ static void refill(CABACContext *c){
|
|||||||
c->low+= c->bytestream[0]<<1;
|
c->low+= c->bytestream[0]<<1;
|
||||||
#endif
|
#endif
|
||||||
c->low -= CABAC_MASK;
|
c->low -= CABAC_MASK;
|
||||||
c->bytestream+= CABAC_BITS/8;
|
if (c->bytestream < c->bytestream_end)
|
||||||
|
c->bytestream += CABAC_BITS / 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void renorm_cabac_decoder_once(CABACContext *c){
|
static inline void renorm_cabac_decoder_once(CABACContext *c){
|
||||||
@ -74,7 +75,8 @@ static void refill2(CABACContext *c){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
c->low += x<<i;
|
c->low += x<<i;
|
||||||
c->bytestream+= CABAC_BITS/8;
|
if (c->bytestream < c->bytestream_end)
|
||||||
|
c->bytestream += CABAC_BITS/8;
|
||||||
}
|
}
|
||||||
|
|
||||||
static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const state){
|
static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const state){
|
||||||
|
Loading…
Reference in New Issue
Block a user