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
-/* $OpenBSD: x509_constraints.c,v 1.29 2022/11/11 12:02:34 beck Exp $ */
+/* $OpenBSD: x509_constraints.c,v 1.30 2022/11/28 07:22:15 tb Exp $ */
/*
* Copyright (c) 2020 Bob Beck <beck@openbsd.org>
*
* we indicate that we have a URI with an empty
* host part, and succeed.
*/
- *hostpart = strdup("");
+ if (hostpart != NULL)
+ *hostpart = strdup("");
return 1;
}
for (i = authority - uri; i < len; i++) {