Fix OPENSSL_config with NULL parameter
authorRoumen Petrov <openssl@roumenpetrov.info>
Fri, 12 Feb 2016 20:18:59 +0000 (22:18 +0200)
committerRich Salz <rsalz@openssl.org>
Thu, 18 Feb 2016 15:25:23 +0000 (10:25 -0500)
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/conf/conf_sap.c

index 2021a02c5d511c9eb896426d4fdf6c971ed7fdef..e70fb7a7388a03b1d8d4fcc796c69df9eea8803c 100644 (file)
@@ -81,7 +81,8 @@ void OPENSSL_config(const char *config_name)
     OPENSSL_INIT_SETTINGS settings;
 
     memset(&settings, 0, sizeof(settings));
-    settings.config_name = strdup(config_name);
+    if (config_name != NULL)
+        settings.config_name = strdup(config_name);
     OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, &settings);
 }
 #endif