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 <michael@niedermayer.cc>2016-05-29 19:11:53 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-05-29 20:00:15 +0300
commitbe96ebdcd795c0d5acd229251eea97f3c4bf6095 (patch)
treeaa6bcb33110c55cb241ee00dd354870e675654ac /libavfilter/vf_fieldhint.c
parent7ae4d574e87364620ac1832e538650af0bf6bf11 (diff)
avfilter/vf_fieldhint: Reorder operation to prevent hypothetical integer overflow
Fixes CID1355110 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/vf_fieldhint.c')
-rw-r--r--libavfilter/vf_fieldhint.c4
1 files changed, 2 insertions, 2 deletions
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];