Initialize the variable that holds the return from SSL_do_handshake.
When the handshake function is not called it will be uninitialized.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <[email protected]>
---
 CryptoPkg/Library/TlsLib/TlsLib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CryptoPkg/Library/TlsLib/TlsLib.c 
b/CryptoPkg/Library/TlsLib/TlsLib.c
index ed300c4..e597995 100644
--- a/CryptoPkg/Library/TlsLib/TlsLib.c
+++ b/CryptoPkg/Library/TlsLib/TlsLib.c
@@ -631,6 +631,7 @@ TlsDoHandshake (
     return EFI_INVALID_PARAMETER;
   }
   
+  ret = 1;
   if(BufferIn == NULL && BufferInSize == 0) {
     //
     // If RequestBuffer is NULL and RequestSize is 0, and TLS session 
-- 
1.9.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to