summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libcrypto/x509/constraints.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regress/lib/libcrypto/x509/constraints.c b/src/regress/lib/libcrypto/x509/constraints.c
index c94e22faf7..86ed8faf14 100644
--- a/src/regress/lib/libcrypto/x509/constraints.c
+++ b/src/regress/lib/libcrypto/x509/constraints.c
@@ -240,6 +240,7 @@ static int
240test_invalid_hostnames(void) 240test_invalid_hostnames(void)
241{ 241{
242 int i, failure = 0; 242 int i, failure = 0;
243 char *nulhost = "www.openbsd.org\0";
243 244
244 for (i = 0; invalid_hostnames[i] != NULL; i++) { 245 for (i = 0; invalid_hostnames[i] != NULL; i++) {
245 if (x509_constraints_valid_host(invalid_hostnames[i], 246 if (x509_constraints_valid_host(invalid_hostnames[i],
@@ -257,7 +258,6 @@ test_invalid_hostnames(void)
257 goto done; 258 goto done;
258 } 259 }
259 } 260 }
260 char *nulhost = "www.openbsd.org\0";
261 if (x509_constraints_valid_host(nulhost, 261 if (x509_constraints_valid_host(nulhost,
262 strlen(nulhost) + 1)) { 262 strlen(nulhost) + 1)) {
263 FAIL("hostname with NUL byte accepted\n"); 263 FAIL("hostname with NUL byte accepted\n");