mirror of
https://github.com/openssl/openssl.git
synced 2025-02-23 14:42:15 +08:00
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@antfin.com> (Merged from https://github.com/openssl/openssl/pull/16987)
This commit is contained in:
parent
64c428c350
commit
a18cdd2807
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user