From: xuyunjia Date: Sun, 18 Oct 2020 15:33:54 +0000 (+0800) Subject: resolve defects: reverse_inull; row[DB_exp_date] referenced before checking X-Git-Tag: OpenSSL_1_1_1i~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b7595e3ecf3e31ecb93f6397300331ba36b2ca4;p=thirdparty%2Fopenssl.git resolve defects: reverse_inull; row[DB_exp_date] referenced before checking Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/13170) (cherry picked from commit 6a13c9c9842f54ed8d98c6f37cc4ae6c1cde8b7a) --- diff --git a/apps/ca.c b/apps/ca.c old mode 100644 new mode 100755 index a4a77126f2f..1b38de37aca --- a/apps/ca.c +++ b/apps/ca.c @@ -1862,8 +1862,8 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, row[DB_exp_date][tm->length] = '\0'; row[DB_rev_date] = NULL; row[DB_file] = OPENSSL_strdup("unknown"); - if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || - (row[DB_file] == NULL) || (row[DB_name] == NULL)) { + if ((row[DB_type] == NULL) || (row[DB_file] == NULL) + || (row[DB_name] == NULL)) { BIO_printf(bio_err, "Memory allocation failure\n"); goto end; }