[FFmpeg-cvslog] avfilter/signature_lookup: Dont copy uninitialized stuff around

Michael Niedermayer git at videolan.org
Sat May 25 01:56:11 EEST 2024


ffmpeg | branch: release/6.1 | Michael Niedermayer <michael at niedermayer.cc> | Mon Apr 22 00:57:43 2024 +0200| [057b8d65e3c5dd6d149560e8a941c843ec804c98] | committer: Michael Niedermayer

avfilter/signature_lookup: Dont copy uninitialized stuff around

Fixes: CID1403238 Uninitialized pointer read
Fixes: CID1403239 Uninitialized pointer read

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit e7174e66ac6025cea4b8e590525314d3aea6a134)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavfilter/signature_lookup.c b/libavfilter/signature_lookup.c
index 208e9cb936..362825935f 100644
--- a/libavfilter/signature_lookup.c
+++ b/libavfilter/signature_lookup.c
@@ -453,14 +453,14 @@ static MatchingInfo evaluate_parameters(AVFilterContext *ctx, SignatureContext *
                 }
 
                 if (tolerancecount > 2) {
-                    a = aprev;
-                    b = bprev;
                     if (dir == DIR_NEXT) {
                         /* turn around */
                         a = infos->first;
                         b = infos->second;
                         dir = DIR_PREV;
                     } else {
+                        a = aprev;
+                        b = bprev;
                         break;
                     }
                 }



More information about the ffmpeg-cvslog mailing list