[FFmpeg-cvslog] avfilter/vf_pad: fix req_end
Michael Niedermayer
git at videolan.org
Tue Dec 3 09:58:32 CET 2013
ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 3 04:08:37 2013 +0100| [cbcc18bd9f9456c38bb4172749692bb5dbed12f5] | committer: Carl Eugen Hoyos
avfilter/vf_pad: fix req_end
Fixes out of array accesses
Fixes Ticket3190
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 0cc5011f9a1b05132f9a20a71feb031f30a8a53b)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbcc18bd9f9456c38bb4172749692bb5dbed12f5
---
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 bb556c9..4592105 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