[FFmpeg-cvslog] avcodec/hevc_ps: Check return code from pps_range_extensions()

Michael Niedermayer git at videolan.org
Tue Jan 6 19:35:25 CET 2015


ffmpeg | branch: release/2.3 | Michael Niedermayer <michaelni at gmx.at> | Thu Nov 27 02:31:46 2014 +0100| [0c51b26729996bdf2acbf4fd34b74b4d14d92a33] | committer: Michael Niedermayer

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 at gmx.at>
(cherry picked from commit 9f9440bd8122cc8798139c9370db0873a24ae14b)

Conflicts:

	libavcodec/hevc_ps.c

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c51b26729996bdf2acbf4fd34b74b4d14d92a33
---

 libavcodec/hevc_ps.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 98d987d..357ff75 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -1289,7 +1289,8 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
         if (sps->ptl.general_ptl.profile_idc == FF_PROFILE_HEVC_REXT && pps_range_extensions_flag) {
             av_log(s->avctx, AV_LOG_ERROR,
                    "PPS extension flag is partially implemented.\n");
-            pps_range_extensions(s, pps, sps);
+            if ((ret = pps_range_extensions(s, pps, sps)) < 0)
+                goto err;
         }
     }
 



More information about the ffmpeg-cvslog mailing list