You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02: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:
@ -47,6 +47,7 @@ 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;
|
||||||
|
if (c->bytestream < c->bytestream_end)
|
||||||
c->bytestream += CABAC_BITS / 8;
|
c->bytestream += CABAC_BITS / 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,6 +75,7 @@ static void refill2(CABACContext *c){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
c->low += x<<i;
|
c->low += x<<i;
|
||||||
|
if (c->bytestream < c->bytestream_end)
|
||||||
c->bytestream += CABAC_BITS/8;
|
c->bytestream += CABAC_BITS/8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user