[openssl] master update

tmraz at fedoraproject.org tmraz at fedoraproject.org
Mon Dec 16 14:05:52 UTC 2019


The branch master has been updated
       via  1aeec3dbc2d62f902698b1eba9ed31cbd436f9dc (commit)
      from  146113827135b4c646531a48f388e43add6ff871 (commit)


- Log -----------------------------------------------------------------
commit 1aeec3dbc2d62f902698b1eba9ed31cbd436f9dc
Author: kinichiro <kinichiro.inoguchi at gmail.com>
Date:   Thu Dec 5 20:00:50 2019 +0900

    Return 1 when openssl req -addext kv is duplicated
    
    CLA: trivial
    
    Fixes #10273
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/10578)

-----------------------------------------------------------------------

Summary of changes:
 apps/req.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/apps/req.c b/apps/req.c
index 76bbbeb555..87994ceb7c 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -214,9 +214,12 @@ static int duplicated(LHASH_OF(OPENSSL_STRING) *addexts, char *kv)
     *p = '\0';
 
     /* Finally have a clean "key"; see if it's there [by attempt to add it]. */
-    if ((p = (char *)lh_OPENSSL_STRING_insert(addexts, (OPENSSL_STRING*)kv))
-        != NULL || lh_OPENSSL_STRING_error(addexts)) {
-        OPENSSL_free(p != NULL ? p : kv);
+    p = (char *)lh_OPENSSL_STRING_insert(addexts, (OPENSSL_STRING*)kv);
+    if (p != NULL) {
+        OPENSSL_free(p);
+        return 1;
+    } else if (lh_OPENSSL_STRING_error(addexts)) {
+        OPENSSL_free(kv);
         return -1;
     }
 


More information about the openssl-commits mailing list