From be96ebdcd795c0d5acd229251eea97f3c4bf6095 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 29 May 2016 18:11:53 +0200 Subject: avfilter/vf_fieldhint: Reorder operation to prevent hypothetical integer overflow Fixes CID1355110 Signed-off-by: Michael Niedermayer --- libavfilter/vf_fieldhint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavfilter') diff --git a/libavfilter/vf_fieldhint.c b/libavfilter/vf_fieldhint.c index 739c1bfa45..2b845e7330 100644 --- a/libavfilter/vf_fieldhint.c +++ b/libavfilter/vf_fieldhint.c @@ -174,8 +174,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) switch (s->mode) { case 0: - top = s->frame[1 + tf - outlink->frame_count]; - bottom = s->frame[1 + bf - outlink->frame_count]; + top = s->frame[tf - outlink->frame_count + 1]; + bottom = s->frame[bf - outlink->frame_count + 1]; break; case 1: top = s->frame[1 + tf]; -- cgit v1.2.3