diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-27 02:31:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-30 21:40:36 +0100 |
commit | 2ba17ac96c72273f0848cbaf6d73697a68f25277 (patch) | |
tree | 7b7ddaa600d3a55e2f2e9b9835742973bf4e6f8a | |
parent | 12e064d6c2ae66bd501872ab4fc2033588419f85 (diff) | |
download | ffmpeg-2ba17ac96c72273f0848cbaf6d73697a68f25277.tar.gz |
avcodec/hevc_ps: Check return code from pps_range_extensions()
Fixes out of array read
Fixes: asan_heap-oob_177e222_885_cov_1532528832_MERGE_D_TI_3.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9f9440bd8122cc8798139c9370db0873a24ae14b)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/hevc_ps.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 4e1c56163d..0d6ede2384 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -1375,7 +1375,8 @@ int ff_hevc_decode_nal_pps(HEVCContext *s) int pps_range_extensions_flag = get_bits1(gb); /* int pps_extension_7bits = */ get_bits(gb, 7); if (sps->ptl.general_ptl.profile_idc == FF_PROFILE_HEVC_REXT && pps_range_extensions_flag) { - pps_range_extensions(s, pps, sps); + if ((ret = pps_range_extensions(s, pps, sps)) < 0) + goto err; } } |