[FFmpeg-cvslog] avfilter/vf_fieldhint: Reorder operation to prevent hypothetical integer overflow

Michael Niedermayer git at videolan.org
Sun May 29 19:02:29 CEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun May 29 18:11:53 2016 +0200| [be96ebdcd795c0d5acd229251eea97f3c4bf6095] | committer: Michael Niedermayer

avfilter/vf_fieldhint: Reorder operation to prevent hypothetical integer overflow

Fixes CID1355110

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be96ebdcd795c0d5acd229251eea97f3c4bf6095
---

 libavfilter/vf_fieldhint.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_fieldhint.c b/libavfilter/vf_fieldhint.c
index 739c1bf..2b845e7 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];



More information about the ffmpeg-cvslog mailing list