diff options
author | tb <> | 2022-11-28 07:24:03 +0000 |
---|---|---|
committer | tb <> | 2022-11-28 07:24:03 +0000 |
commit | ff87c2bb70b531cb0565d09034121e93cedc0e17 (patch) | |
tree | a9a6093a10f3292d7f7121d052b08c6c4b75b893 /src/regress/lib | |
parent | 1b77f019fce5ce3f0dc81905cc3905e1f4fc2ba3 (diff) | |
download | openbsd-ff87c2bb70b531cb0565d09034121e93cedc0e17.tar.gz openbsd-ff87c2bb70b531cb0565d09034121e93cedc0e17.tar.bz2 openbsd-ff87c2bb70b531cb0565d09034121e93cedc0e17.zip |
Tweak x509_constraints_uri_host() regress to test for NULL deref in
fixed in x509_constraints.c r1.29.
Diffstat (limited to 'src/regress/lib')
-rw-r--r-- | src/regress/lib/libcrypto/x509/constraints.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ | |||
1 | /* $OpenBSD: constraints.c,v 1.14 2022/11/23 23:06:16 kn Exp $ */ | 1 | /* $OpenBSD: constraints.c,v 1.15 2022/11/28 07:24:03 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -466,6 +466,8 @@ test_constraints1(void) | |||
466 | char *hostpart = NULL; | 466 | char *hostpart = NULL; |
467 | error = 0; | 467 | error = 0; |
468 | if (!x509_constraints_uri_host(noauthority[j], | 468 | if (!x509_constraints_uri_host(noauthority[j], |
469 | strlen(noauthority[j]), NULL) || | ||
470 | !x509_constraints_uri_host(noauthority[j], | ||
469 | strlen(noauthority[j]), &hostpart)) { | 471 | strlen(noauthority[j]), &hostpart)) { |
470 | FAIL("name '%s' should parse as a URI", | 472 | FAIL("name '%s' should parse as a URI", |
471 | noauthority[j]); | 473 | noauthority[j]); |