From ff87c2bb70b531cb0565d09034121e93cedc0e17 Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 28 Nov 2022 07:24:03 +0000 Subject: Tweak x509_constraints_uri_host() regress to test for NULL deref in fixed in x509_constraints.c r1.29. --- src/regress/lib/libcrypto/x509/constraints.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/regress/lib/libcrypto/x509/constraints.c') diff --git a/src/regress/lib/libcrypto/x509/constraints.c b/src/regress/lib/libcrypto/x509/constraints.c index d3fdf0e52b..8771367bd6 100644 --- a/src/regress/lib/libcrypto/x509/constraints.c +++ b/src/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]); -- cgit v1.2.3-55-g6feb