Browse Source

h264: prevent overreads in intra PCM decoding.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit d1604b3de9)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
tags/n0.8.11
Ronald S. Bultje Reinhard Tartler 14 years ago
parent
commit
bd37b95383
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/h264_cabac.c

+ 2
- 0
libavcodec/h264_cabac.c View File

@@ -1958,6 +1958,8 @@ decode_intra_mb:
}

// The pixels are stored in the same order as levels in h->mb array.
if ((int) (h->cabac.bytestream_end - ptr) < mb_size)
return -1;
memcpy(h->mb, ptr, mb_size); ptr+=mb_size;

ff_init_cabac_decoder(&h->cabac, ptr, h->cabac.bytestream_end - ptr);


Loading…
Cancel
Save