[SCM] libav/master: h264: check that execute_decode_slices() is not called too many times
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun May 4 21:36:31 UTC 2014
The following commit has been merged in the master branch:
commit 7e513d85e80d730718695d09fcaf0295ae24699e
Author: Anton Khirnov <anton at khirnov.net>
Date: Thu Nov 28 10:54:35 2013 +0100
h264: check that execute_decode_slices() is not called too many times
Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable at libav.org
(cherry picked from commit 9eef9eb3014b2ed9c3ff4aac510a9f04edb555cf)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7acc5a7..b5f4493 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3833,6 +3833,12 @@ static int execute_decode_slices(H264Context *h, int context_count)
H264Context *hx;
int i;
+ if (s->mb_y >= s->mb_height) {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "Input contains more MB rows than the frame height.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (s->avctx->hwaccel ||
s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
return 0;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list