From 2fab5c9605c5348be5ad08218a4f8d92f5376549 Mon Sep 17 00:00:00 2001 From: Brian Murray Date: Thu, 15 Dec 2016 18:51:13 -0800 Subject: [PATCH 1/2] Work around for GCC bug --- library/cmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/cmac.c b/library/cmac.c index b2fe713a0..9fcb43979 100644 --- a/library/cmac.c +++ b/library/cmac.c @@ -765,7 +765,7 @@ static int cmac_test_subkeys( int verbose, int block_size, int num_tests ) { - int i, ret; + int i, ret = 0; mbedtls_cipher_context_t ctx; const mbedtls_cipher_info_t *cipher_info; unsigned char K1[MBEDTLS_CIPHER_BLKSIZE_MAX]; @@ -847,7 +847,7 @@ static int cmac_test_wth_cipher( int verbose, int num_tests ) { const mbedtls_cipher_info_t *cipher_info; - int i, ret; + int i, ret = 0; unsigned char output[MBEDTLS_CIPHER_BLKSIZE_MAX]; cipher_info = mbedtls_cipher_info_from_type( cipher_type ); From 88c6df1ce8cb5b553e1f8f1f24c41b473a73db03 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 22 Mar 2018 21:48:28 +0100 Subject: [PATCH 2/2] Add ChangeLog entry --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index fbc24cf73..fe7a3f374 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,8 @@ Bugfix in RFC 6347 Section 4.3.1. This could cause the execution of the renegotiation routines at unexpected times when the protocol is DTLS. Found by wariua. #687 + * Fix spurious uninitialized variable warning in cmac.c. Fix independently + contributed by Brian J Murray and David Brown. = mbed TLS 2.4.1 branch released 2016-12-13