From de7a230489181faa977fcf352fc1df37c7ba5bb0 Mon Sep 17 00:00:00 2001 From: tb Date: Mon, 28 Nov 2022 07:24:03 +0000 Subject: [PATCH] Tweak x509_constraints_uri_host() regress to test for NULL deref in fixed in x509_constraints.c r1.29. --- regress/lib/libcrypto/x509/constraints.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/regress/lib/libcrypto/x509/constraints.c b/regress/lib/libcrypto/x509/constraints.c index d3fdf0e52b0..8771367bd6c 100644 --- a/regress/lib/libcrypto/x509/constraints.c +++ b/regress/lib/libcrypto/x509/constraints.c @@ -1,4 +1,4 @@ -/* $OpenBSD: constraints.c,v 1.14 2022/11/23 23:06:16 kn Exp $ */ +/* $OpenBSD: constraints.c,v 1.15 2022/11/28 07:24:03 tb Exp $ */ /* * Copyright (c) 2020 Bob Beck * @@ -466,6 +466,8 @@ test_constraints1(void) char *hostpart = NULL; error = 0; if (!x509_constraints_uri_host(noauthority[j], + strlen(noauthority[j]), NULL) || + !x509_constraints_uri_host(noauthority[j], strlen(noauthority[j]), &hostpart)) { FAIL("name '%s' should parse as a URI", noauthority[j]); -- 2.20.1