mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
check the return value of OPENSSL_strdup(CRYPTO_strdup) in apps/lib/app_rand.c:32
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17124)
This commit is contained in:
parent
01fde90eec
commit
3e0441520b
@ -28,8 +28,14 @@ void app_RAND_load_conf(CONF *c, const char *section)
|
||||
BIO_printf(bio_err, "Can't load %s into RNG\n", randfile);
|
||||
ERR_print_errors(bio_err);
|
||||
}
|
||||
if (save_rand_file == NULL)
|
||||
if (save_rand_file == NULL) {
|
||||
save_rand_file = OPENSSL_strdup(randfile);
|
||||
/* If some internal memory errors have occurred */
|
||||
if (save_rand_file == NULL) {
|
||||
BIO_printf(bio_err, "Can't duplicate %s\n", randfile);
|
||||
ERR_print_errors(bio_err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int loadfiles(char *name)
|
||||
|
Loading…
Reference in New Issue
Block a user