diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-02 21:17:48 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-02 21:23:40 +0100 |
commit | dfefc9097e9b4bb20442e65454a40043bd189b3d (patch) | |
tree | aa272a9fb4894212aa401fb9dbfcf7ef331ce9de /libavcodec | |
parent | 8b8ae298afb32979c81310ffdc9904d29497db5f (diff) | |
download | ffmpeg-streaming-dfefc9097e9b4bb20442e65454a40043bd189b3d.zip ffmpeg-streaming-dfefc9097e9b4bb20442e65454a40043bd189b3d.tar.gz |
avcodec/hevcpred_template: also initialize top[-1] for constrained intra prediction
Fixes out of array read
Fixes: 387713a12dc5cfa27fcb4178084ce1ea-asan_stack-oob_131176a_1182_cov_3861068719_CAINIT_C_SHARP_3.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/hevcpred_template.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/hevcpred_template.c b/libavcodec/hevcpred_template.c index 5ba9591..1d83249 100644 --- a/libavcodec/hevcpred_template.c +++ b/libavcodec/hevcpred_template.c @@ -155,6 +155,7 @@ static void FUNC(intra_pred)(HEVCContext *s, int x0, int y0, int log2_size, int left[i] = 128; top[i] = 128; } + top[-1] = 128; } if (cand_bottom_left) { for (i = size + bottom_left_size; i < (size << 1); i++) |