Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-02-29 06:48:27 +0400
committerReinhard Tartler <siretart@tauware.de>2012-04-01 20:33:28 +0400
commitbd37b95383b6bd6b69aa8dba8eebd2cbef2aeed8 (patch)
tree98d8c617dc1b3c32f8ce9629b803aba237b30927 /libavcodec
parent58133bb010c1587515ab4a8bf990760ca28b4dda (diff)
h264: prevent overreads in intra PCM decoding.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org (cherry picked from commit d1604b3de96575195b219028e2c4f08b2259aa7d) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264_cabac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index e8c8503857..ae3318da53 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -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);