OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d0ac9a
)
avfilter/vf_pad: fix req_end
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 3 Dec 2013 03:08:37 +0000
(
04:08
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 3 Dec 2013 03:09:10 +0000
(
04:09
+0100)
Fixes out of array accesses
Fixes Ticket3190
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_pad.c
patch
|
blob
|
history
diff --git
a/libavfilter/vf_pad.c
b/libavfilter/vf_pad.c
index
2740c63
..
2962e20
100644
(file)
--- 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;