X509v3_addr_canonize(): Check whether addr == NULL

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26583)
This commit is contained in:
Bartel Artem 2025-01-29 10:21:35 +03:00 committed by Tomas Mraz
parent da44eb2901
commit d3b6b81eab

View File

@ -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);