h264: fix overreads in cabac reader.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
pull/4/head
Ronald S. Bultje 13 years ago
parent d360dd902c
commit 7374fac804
  1. 2
      libavcodec/cabac_functions.h

@ -47,6 +47,7 @@ static void refill(CABACContext *c){
c->low+= c->bytestream[0]<<1;
#endif
c->low -= CABAC_MASK;
if (c->bytestream < c->bytestream_end)
c->bytestream += CABAC_BITS / 8;
}
@ -74,6 +75,7 @@ static void refill2(CABACContext *c){
#endif
c->low += x<<i;
if (c->bytestream < c->bytestream_end)
c->bytestream += CABAC_BITS/8;
}

Loading…
Cancel
Save