diff options
author | Philip Langdale <philipl@overt.org> | 2016-11-30 16:13:14 -0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-14 12:20:15 +0200 |
commit | d4f4fa22d7acb256f7cedc6098f2a294ebfb3f32 (patch) | |
tree | aafe0cdf3c578fdf95a37f74c18937ffe7a8167c /libavcodec | |
parent | 8ee3f73464c4dff464c78fd24b6d4329a5602bde (diff) | |
download | ffmpeg-d4f4fa22d7acb256f7cedc6098f2a294ebfb3f32.tar.gz |
avcodec/vdpau_hevc: Fix potential out-of-bounds write
The maximum number of references is 16, so the index value cannot
exceed 15.
Fixes Coverity CID 1348139, 1348140, 1348141
(cherry picked from commit 4e6d1c1f4ec83000a067ff14452b34c1f2d2a43a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vdpau_hevc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vdpau_hevc.c b/libavcodec/vdpau_hevc.c index 03c61dc6cc..ce2610f67f 100644 --- a/libavcodec/vdpau_hevc.c +++ b/libavcodec/vdpau_hevc.c @@ -234,7 +234,7 @@ static int vdpau_hevc_start_frame(AVCodecContext *avctx, const HEVCFrame *frame = &h->DPB[i]; if (frame != h->ref && (frame->flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF))) { - if (j > 16) { + if (j > 15) { av_log(avctx, AV_LOG_WARNING, "VDPAU only supports up to 16 references in the DPB. " "This frame may not be decoded correctly.\n"); |