Initialise return values to an error
Initialising the return values to and error is best practice and makes
the library more robust.
diff --git a/library/nist_kw.c b/library/nist_kw.c
index 317a242..03e8072 100644
--- a/library/nist_kw.c
+++ b/library/nist_kw.c
@@ -39,6 +39,7 @@
#include "mbedtls/nist_kw.h"
#include "mbedtls/platform_util.h"
+#include "mbedtls/error.h"
#include <stdint.h>
#include <string.h>
@@ -116,7 +117,7 @@
unsigned int keybits,
const int is_wrap )
{
- int ret;
+ int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
const mbedtls_cipher_info_t *cipher_info;
cipher_info = mbedtls_cipher_info_from_values( cipher,