Browse Source

avfilter/vf_fieldhint: Reorder operation to prevent hypothetical integer overflow

Fixes CID1355110

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.1
Michael Niedermayer 9 years ago
parent
commit
be96ebdcd7
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavfilter/vf_fieldhint.c

+ 2
- 2
libavfilter/vf_fieldhint.c View File

@@ -174,8 +174,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)


switch (s->mode) { switch (s->mode) {
case 0: 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; break;
case 1: case 1:
top = s->frame[1 + tf]; top = s->frame[1 + tf];


Loading…
Cancel
Save