[FFmpeg-cvslog] avcodec/h264_refs: Fix long_idx check

Michael Niedermayer git at videolan.org
Fri Jan 15 17:51:09 CET 2016


ffmpeg | branch: release/2.5 | Michael Niedermayer <michael at niedermayer.cc> | Sat Dec 19 21:59:42 2015 +0100| [a5b4b807757fda3dc920d4b23599f8391c21409b] | committer: Michael Niedermayer

avcodec/h264_refs: Fix long_idx check

Fixes out of array read
Fixes mozilla bug 1233606

Found-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit b92b4775a0d07cacfdd2b4be6511f3cb362c977b)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/h264_refs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 045f184..d0a902c 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -283,7 +283,7 @@ int ff_h264_decode_ref_pic_list_reordering(H264Context *h)
 
                     long_idx = pic_num_extract(h, pic_id, &pic_structure);
 
-                    if (long_idx > 31) {
+                    if (long_idx > 31U) {
                         av_log(h->avctx, AV_LOG_ERROR,
                                "long_term_pic_idx overflow\n");
                         return AVERROR_INVALIDDATA;



More information about the ffmpeg-cvslog mailing list