diff options
author | Philip Langdale <philipl@overt.org> | 2016-11-30 16:13:14 -0800 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2016-11-30 16:14:39 -0800 |
commit | 4e6d1c1f4ec83000a067ff14452b34c1f2d2a43a (patch) | |
tree | aa9f20e22e53bdf9d70f129e092f98eecf47cbbe /libavcodec/vdpau_hevc.c | |
parent | 5512dbe37f83d8b11393c7059c6eae48d164461c (diff) | |
download | ffmpeg-4e6d1c1f4ec83000a067ff14452b34c1f2d2a43a.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
Diffstat (limited to 'libavcodec/vdpau_hevc.c')
-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"); |