Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-03 20:54:43 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-08-03 21:15:46 +0400
commite43a0a232dbf6d3c161823c2e07c52e76227a1bc (patch)
tree6ccf4fedf12be91e9de6f73fee41d202612916b5 /libavfilter/vf_fieldmatch.c
parentbc4e7985628134496104e32f37f811aab4f68c55 (diff)
avfilter: fix plane validity checks
Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_fieldmatch.c')
-rw-r--r--libavfilter/vf_fieldmatch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c
index 3a6f806a8b..89c4909a3d 100644
--- a/libavfilter/vf_fieldmatch.c
+++ b/libavfilter/vf_fieldmatch.c
@@ -608,7 +608,7 @@ static void copy_fields(const FieldMatchContext *fm, AVFrame *dst,
const AVFrame *src, int field)
{
int plane;
- for (plane = 0; plane < 4 && src->data[plane]; plane++)
+ for (plane = 0; plane < 4 && src->data[plane] && src->linesize[plane]; plane++)
av_image_copy_plane(dst->data[plane] + field*dst->linesize[plane], dst->linesize[plane] << 1,
src->data[plane] + field*src->linesize[plane], src->linesize[plane] << 1,
get_width(fm, src, plane), get_height(fm, src, plane) / 2);