Fix NULL dereference in x509_constraints_uri_host()
authortb <tb@openbsd.org>
Mon, 28 Nov 2022 07:22:15 +0000 (07:22 +0000)
committertb <tb@openbsd.org>
Mon, 28 Nov 2022 07:22:15 +0000 (07:22 +0000)
commit215e6767bc08f6f1f7de1bf68c9ef05ca9b21e78
tree1f4e8d41626ea465872e527d272b2b85a6eca53a
parent4935233755f43844f10cc2d1471668d044021ef6
Fix NULL dereference in x509_constraints_uri_host()

When called from v2i, hostpart in x509_constraints_uri_host() is NULL, so
add a NULL check before storing the strdup result in it.

From Anton Borowka

ok jsing miod
lib/libcrypto/x509/x509_constraints.c