From: Pauli Date: Fri, 29 Mar 2019 08:19:19 +0000 (+1000) Subject: It isn't necessary to initialise a struct stat before a stat(2) system call. X-Git-Tag: openssl-3.0.0-alpha1~2280 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2661d716d99fc1dd3240dcdbca6ab73d7b61a72b;p=oweals%2Fopenssl.git 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 (Merged from https://github.com/openssl/openssl/pull/8611) --- diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 594f7c5e5a..277e4d64c9 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -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) {