[FFmpeg-cvslog] avfilter/vf_pad: fix req_end
Michael Niedermayer
git at videolan.org
Tue Dec 3 04:31:13 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 3 04:08:37 2013 +0100| [0cc5011f9a1b05132f9a20a71feb031f30a8a53b] | committer: Michael Niedermayer
avfilter/vf_pad: fix req_end
Fixes out of array accesses
Fixes Ticket3190
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0cc5011f9a1b05132f9a20a71feb031f30a8a53b
---
libavfilter/vf_pad.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index 2740c63..2962e20 100644
--- a/libavfilter/vf_pad.c
+++ b/libavfilter/vf_pad.c
@@ -251,7 +251,7 @@ static int buffer_needs_copy(PadContext *s, AVFrame *frame, AVBufferRef *buf)
(s->y >> vsub) * frame->linesize[planes[i]];
ptrdiff_t req_end = ((s->w - s->x - frame->width) >> hsub) *
s->draw.pixelstep[planes[i]] +
- (s->y >> vsub) * frame->linesize[planes[i]];
+ ((s->h - s->y - frame->height) >> vsub) * frame->linesize[planes[i]];
if (frame->linesize[planes[i]] < (s->w >> hsub) * s->draw.pixelstep[planes[i]])
return 1;
More information about the ffmpeg-cvslog
mailing list