[openssl] master update

tmraz at fedoraproject.org tmraz at fedoraproject.org
Mon Dec 21 13:39:00 UTC 2020


The branch master has been updated
       via  7a7ed5fc7978309c997804e174914a037777d786 (commit)
      from  3a1ee3c1993c588a22cb80f1d0eb6237f83a1560 (commit)


- Log -----------------------------------------------------------------
commit 7a7ed5fc7978309c997804e174914a037777d786
Author: jwalch <jeremy.walch at gmail.com>
Date:   Tue Dec 15 15:00:11 2020 -0500

    Restore v2i_AUTHORITY_INFO_ACCESS() behavior
    
    Fixes #13636
    
    Reviewed-by: Ben Kaduk <kaduk at mit.edu>
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/13683)

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

Summary of changes:
 crypto/x509/v3_info.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/crypto/x509/v3_info.c b/crypto/x509/v3_info.c
index 003f3ce172..053e591088 100644
--- a/crypto/x509/v3_info.c
+++ b/crypto/x509/v3_info.c
@@ -108,7 +108,7 @@ static AUTHORITY_INFO_ACCESS *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD
     ACCESS_DESCRIPTION *acc;
     int i;
     const int num = sk_CONF_VALUE_num(nval);
-    char *ptmp;
+    char *objtmp, *ptmp;
 
     if ((ainfo = sk_ACCESS_DESCRIPTION_new_reserve(NULL, num)) == NULL) {
         ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE);
@@ -130,12 +130,18 @@ static AUTHORITY_INFO_ACCESS *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD
         ctmp.value = cnf->value;
         if (!v2i_GENERAL_NAME_ex(acc->location, method, ctx, &ctmp, 0))
             goto err;
-        acc->method = OBJ_txt2obj(cnf->value, 0);
+        if ((objtmp = OPENSSL_strndup(cnf->name, ptmp - cnf->name)) == NULL) {
+            ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE);
+            goto err;
+        }
+        acc->method = OBJ_txt2obj(objtmp, 0);
         if (!acc->method) {
             ERR_raise_data(ERR_LIB_X509V3, X509V3_R_BAD_OBJECT,
-                           "value=%s", cnf->value);
+                           "value=%s", objtmp);
+            OPENSSL_free(objtmp);
             goto err;
         }
+        OPENSSL_free(objtmp);
     }
     return ainfo;
  err:


More information about the openssl-commits mailing list