diff mbox

[FFmpeg-devel,9/9] avfilter/signature_lookup: fix potential uninitialized reads

Message ID 20171108181753.6776-10-timo@rothenpieler.org
State New
Headers show

Commit Message

Timo Rothenpieler Nov. 8, 2017, 6:17 p.m. UTC
Fixes CID #1403238 and #1403239
---
 libavfilter/signature_lookup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Timo Rothenpieler Nov. 13, 2017, 10:23 a.m. UTC | #1
Am 08.11.2017 um 19:17 schrieb Timo Rothenpieler:
> Fixes CID #1403238 and #1403239
> ---
>   libavfilter/signature_lookup.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

ping

I'm not fully certain if this is the right fix, or if there is a logic 
error in the quite complex code.

Gonna push this soonish otherwise, as reading a NULL is still better 
than reading something uninitialized.
diff mbox

Patch

diff --git a/libavfilter/signature_lookup.c b/libavfilter/signature_lookup.c
index 272c717c77..7de4a88ca2 100644
--- a/libavfilter/signature_lookup.c
+++ b/libavfilter/signature_lookup.c
@@ -421,7 +421,7 @@  static MatchingInfo evaluate_parameters(AVFilterContext *ctx, SignatureContext *
     int fcount = 0, goodfcount = 0, gooda = 0, goodb = 0;
     double meandist, minmeandist = bestmatch.meandist;
     int tolerancecount = 0;
-    FineSignature *a, *b, *aprev, *bprev;
+    FineSignature *a, *b, *aprev = NULL, *bprev = NULL;
     int status = STATUS_NULL;
 
     for (; infos != NULL; infos = infos->next) {