From 69588edbaa424beb71c6a9b1be416588232cb78c Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Tue, 12 Jul 2016 15:50:06 +0200 Subject: Check for errors allocating the error strings. Reviewed-by: Richard Levitte GH: #1330 --- crypto/init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crypto/init.c') diff --git a/crypto/init.c b/crypto/init.c index ace11da610..332567eae7 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -92,6 +92,7 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_no_load_crypto_strings) DEFINE_RUN_ONCE_STATIC(ossl_init_load_crypto_strings) { + int ret = 1; /* * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time * pulling in all the error strings during static linking @@ -101,10 +102,10 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_load_crypto_strings) fprintf(stderr, "OPENSSL_INIT: ossl_init_load_crypto_strings: " "err_load_crypto_strings_int()\n"); # endif - err_load_crypto_strings_int(); + ret = err_load_crypto_strings_int(); #endif load_crypto_strings_inited = 1; - return 1; + return ret; } static CRYPTO_ONCE add_all_ciphers = CRYPTO_ONCE_STATIC_INIT; -- cgit v1.2.3