[FFmpeg-cvslog] h264: correct ref count check and limit, fix out of array accesses.
Michael Niedermayer
git at videolan.org
Mon Dec 3 21:14:38 CET 2012
ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 18 16:29:04 2012 +0100| [c82d6e05da0898c45ae915fb808e175f6a4ec7e5] | committer: Michael Niedermayer
h264: correct ref count check and limit, fix out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit d6c184880ee2e09fd68c0ae217173832cee5afc1)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c82d6e05da0898c45ae915fb808e175f6a4ec7e5
---
libavcodec/h264.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 713fda7..ec3afea 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2922,7 +2922,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h->ref_count[1] = get_ue_golomb(&s->gb) + 1;
else
// full range is spec-ok in this case, even for frames
- max[1] = 31;
+ h->ref_count[1] = 1;
}
if (h->ref_count[0]-1 > max[0] || h->ref_count[1]-1 > max[1]){
More information about the ffmpeg-cvslog
mailing list