[openssl] master update

Dr. Paul Dale pauli at openssl.org
Tue Nov 9 10:02:43 UTC 2021


The branch master has been updated
       via  a18cdd28077be05ec88538be84a761469f3f20c4 (commit)
      from  64c428c35053a101a452c42d5d0a9a8342493606 (commit)


- Log -----------------------------------------------------------------
commit a18cdd28077be05ec88538be84a761469f3f20c4
Author: Pauli <pauli at openssl.org>
Date:   Mon Nov 8 11:27:59 2021 +1000

    x509: remove dead call to strlen()
    
    The condition `userlen == -1` isn't possible because this is already checked
    on line 159 above and the subsequent strlen(3) call guarantees that it's value
    is positive.
    
    Reviewed-by: Paul Yang <kaishen.yy at antfin.com>
    (Merged from https://github.com/openssl/openssl/pull/16987)

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

Summary of changes:
 crypto/x509/v3_sxnet.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/crypto/x509/v3_sxnet.c b/crypto/x509/v3_sxnet.c
index 3e5ae048be..4b19ce07d5 100644
--- a/crypto/x509/v3_sxnet.c
+++ b/crypto/x509/v3_sxnet.c
@@ -177,8 +177,6 @@ int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *zone, const char *user,
 
     if ((id = SXNETID_new()) == NULL)
         goto err;
-    if (userlen == -1)
-        userlen = strlen(user);
 
     if (!ASN1_OCTET_STRING_set(id->user, (const unsigned char *)user, userlen))
         goto err;


More information about the openssl-commits mailing list