Skip to content

Commit

Permalink
X509v3_addr_canonize(): Check whether addr == NULL
Browse files Browse the repository at this point in the history
Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Tim Hudson <[email protected]>
(Merged from openssl/openssl#26583)
  • Loading branch information
onexyoung authored and t8m committed Mar 3, 2025
1 parent da44eb2 commit d3b6b81
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crypto/x509/v3_addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,11 @@ int X509v3_addr_canonize(IPAddrBlocks *addr)
{
int i;

if (addr == NULL) {
ERR_raise(ERR_LIB_X509V3, X509V3_R_INVALID_NULL_ARGUMENT);
return 0;
}

for (i = 0; i < sk_IPAddressFamily_num(addr); i++) {
IPAddressFamily *f = sk_IPAddressFamily_value(addr, i);

Expand Down

0 comments on commit d3b6b81

Please sign in to comment.