From 9535c3f778f521b552cefe74f4a40fbae65ac224 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 6 May 2021 11:03:19 +0200 Subject: [PATCH] wolfssl: Properly handle failure to initialize SHAKE_256 --- src/libstrongswan/plugins/wolfssl/wolfssl_xof.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstrongswan/plugins/wolfssl/wolfssl_xof.c b/src/libstrongswan/plugins/wolfssl/wolfssl_xof.c index f25c524dc6..1e5ae6838f 100644 --- a/src/libstrongswan/plugins/wolfssl/wolfssl_xof.c +++ b/src/libstrongswan/plugins/wolfssl/wolfssl_xof.c @@ -143,6 +143,7 @@ xof_t *wolfssl_xof_create(ext_out_function_t algorithm) if (wc_InitShake256(&this->shake, NULL, 0) != 0) { free(this); + return NULL; } return &this->public; -- 2.47.2