diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 10:42:05 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 10:47:04 +0100 |
commit | ededb5ffed7931680d4506d71c678a80a622ea2b (patch) | |
tree | 3dc151eae89b30ca0f865936336f8bb1575117e8 /libavcodec | |
parent | 9cbe834dfd49c287e6f2033388d0cc5ac290717a (diff) | |
parent | 074c769de93bf12e9f44d77e58a8c7167f9dfb13 (diff) | |
download | ffmpeg-ededb5ffed7931680d4506d71c678a80a622ea2b.tar.gz |
Merge commit '074c769de93bf12e9f44d77e58a8c7167f9dfb13'
* commit '074c769de93bf12e9f44d77e58a8c7167f9dfb13':
h264_cavlc: check the size of the intra PCM data.
This check is redundant, but does no harm
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264_cavlc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index 68e2b8c0d6..a06203bac5 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -773,6 +773,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 |