It isn't necessary to initialise a struct stat before a stat(2) system call.

The initialisation was also flawed, failing to account for padding and
alignment bytes.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8611)
This commit is contained in:
Pauli 2019-03-29 18:19:19 +10:00
parent 64a45882c7
commit 2661d716d9

View file

@ -669,7 +669,7 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from)
static BIO *process_include(char *include, OPENSSL_DIR_CTX **dirctx,
char **dirpath)
{
struct stat st = { 0 };
struct stat st;
BIO *next;
if (stat(include, &st) < 0) {