aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-03 04:08:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-03 04:09:10 +0100
commit0cc5011f9a1b05132f9a20a71feb031f30a8a53b (patch)
treebebd8b6020e0da4465748723ed7098f7a10b4b4f
parent4d0ac9aee920cd95c35fbf4cd0a073baf86ff4c2 (diff)
downloadffmpeg-0cc5011f9a1b05132f9a20a71feb031f30a8a53b.tar.gz
avfilter/vf_pad: fix req_end
Fixes out of array accesses Fixes Ticket3190 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/vf_pad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index 2740c634db..2962e204f0 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;