[FFmpeg-cvslog] avcodec/vdpau_hevc: Fix potential out-of-bounds write
Philip Langdale
git at videolan.org
Thu Dec 1 02:15:03 EET 2016
ffmpeg | branch: master | Philip Langdale <philipl at overt.org> | Wed Nov 30 16:13:14 2016 -0800| [4e6d1c1f4ec83000a067ff14452b34c1f2d2a43a] | committer: Philip Langdale
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
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e6d1c1f4ec83000a067ff14452b34c1f2d2a43a
---
libavcodec/vdpau_hevc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/vdpau_hevc.c b/libavcodec/vdpau_hevc.c
index 03c61dc..ce2610f 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");
More information about the ffmpeg-cvslog
mailing list