From eebed0cc1c68299e8f763e83036abfac271d3c2f Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 8 Nov 2021 11:05:59 -0800 Subject: [PATCH] Fix for possible `ret` may be used uninitialized. --- src/sniffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sniffer.c b/src/sniffer.c index 5e54eccd0..f946c98a7 100644 --- a/src/sniffer.c +++ b/src/sniffer.c @@ -2595,6 +2595,7 @@ static int SetupKeys(const byte* input, int* sslBytes, SnifferSession* session, } #endif + ret = 0; #ifdef WOLFSSL_SNIFFER_KEY_CALLBACK if (KeyCb != NULL && ksInfo) { if (keyBuf == NULL) { @@ -2701,6 +2702,7 @@ static int SetupKeys(const byte* input, int* sslBytes, SnifferSession* session, } #endif + ret = 0; #ifdef WOLFSSL_SNIFFER_KEY_CALLBACK if (KeyCb != NULL && ksInfo) { if (keyBuf == NULL) {