diff options
author | tb <> | 2022-11-28 07:24:03 +0000 |
---|---|---|
committer | tb <> | 2022-11-28 07:24:03 +0000 |
commit | ef0495ded9e4bad841173ad26743b8183207a70c (patch) | |
tree | a9a6093a10f3292d7f7121d052b08c6c4b75b893 /src/regress/lib/libcrypto/x509/constraints.c | |
parent | 4eccf1715855e95020641b0b70e41a649ac9833c (diff) | |
download | openbsd-ef0495ded9e4bad841173ad26743b8183207a70c.tar.gz openbsd-ef0495ded9e4bad841173ad26743b8183207a70c.tar.bz2 openbsd-ef0495ded9e4bad841173ad26743b8183207a70c.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/libcrypto/x509/constraints.c')
-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]); |