mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 02:12:28 +00:00
h264_cavlc: check the size of the intra PCM data.
Fixes invalid reads. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
This commit is contained in:
parent
ac0e03bab0
commit
074c769de9
@ -765,6 +765,10 @@ decode_intra_mb:
|
||||
|
||||
// We assume these blocks are very rare so we do not optimize it.
|
||||
h->intra_pcm_ptr = align_get_bits(&h->gb);
|
||||
if (get_bits_left(&h->gb) < mb_size) {
|
||||
av_log(h->avctx, AV_LOG_ERROR, "Not enough data for an intra PCM block.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
skip_bits_long(&h->gb, mb_size);
|
||||
|
||||
// In deblocking, the quantizer is 0
|
||||
|
Loading…
Reference in New Issue
Block a user