[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Matt Caswell matt at openssl.org
Thu Jun 22 16:03:14 UTC 2017


The branch OpenSSL_1_1_0-stable has been updated
       via  d9ac82a28d10c05d7b491324596a9d8ce7a9319e (commit)
      from  ca9e4d7a36c8906c30a7daf17d6239d42f761ddf (commit)


- Log -----------------------------------------------------------------
commit d9ac82a28d10c05d7b491324596a9d8ce7a9319e
Author: Matt Caswell <matt at openssl.org>
Date:   Thu Jun 22 15:25:26 2017 +0100

    Fix OBJ_create() to tolerate a NULL sn and ln
    
    In 1.0.2 and before OBJ_create() allowed the sn or ln parameter to be NULL.
    Commit 52832e47 changed that so that it crashed if they were NULL.
    
    This was causing problems with the built-in config oid module. If a long
    name was provided OBJ_create() is initially called with a NULL ln and
    therefore causes a crash.
    
    Fixes #3733
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3753)
    
    (cherry picked from commit f13615c5b828aeb8e3d9bf2545c803633d1c684f)

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

Summary of changes:
 crypto/objects/obj_dat.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c
index 9f37417..fd833be 100644
--- a/crypto/objects/obj_dat.c
+++ b/crypto/objects/obj_dat.c
@@ -685,7 +685,8 @@ int OBJ_create(const char *oid, const char *sn, const char *ln)
     int ok = 0;
 
     /* Check to see if short or long name already present */
-    if (OBJ_sn2nid(sn) != NID_undef || OBJ_ln2nid(ln) != NID_undef) {
+    if ((sn != NULL && OBJ_sn2nid(sn) != NID_undef)
+            || (ln != NULL && OBJ_ln2nid(ln) != NID_undef)) {
         OBJerr(OBJ_F_OBJ_CREATE, OBJ_R_OID_EXISTS);
         return 0;
     }


More information about the openssl-commits mailing list