Skip to content

Commit

Permalink
Use build-in string-copy function (#1078)
Browse files Browse the repository at this point in the history
Use build-in memory copy function for a string type.
  • Loading branch information
torben-hansen authored Jun 28, 2023
1 parent 66bc075 commit e1ff128
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crypto/x509/x509_vpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ static int int_x509_param_set1_email(char **pdest, size_t *pdestlen,
srclen = strlen(src);
}

tmp = OPENSSL_memdup(src, srclen);
tmp = OPENSSL_strndup(src, srclen);
if (tmp == NULL) {
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion include/openssl/x509.h
Original file line number Diff line number Diff line change
Expand Up @@ -2961,7 +2961,7 @@ OPENSSL_EXPORT int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
size_t emaillen);

// X509_VERIFY_PARAM_set1_ip sets the expected IP address to |ip|. |iplen| MUST
// be set to the length of |email|.
// be set to the length of |ip|.
OPENSSL_EXPORT int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
const unsigned char *ip,
size_t iplen);
Expand Down

0 comments on commit e1ff128

Please sign in to comment.