From 9ea232b5eaf388983a2f2886d7918b2ea8495d2e Mon Sep 17 00:00:00 2001 From: tb Date: Sun, 4 Feb 2024 13:07:02 +0000 Subject: [PATCH] Fix asn1_integer_null_data_test() The failed variable was erroneously initialized to 0, making this test always pass. From Christian Andersen, thanks! --- regress/lib/libcrypto/asn1/asn1basic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regress/lib/libcrypto/asn1/asn1basic.c b/regress/lib/libcrypto/asn1/asn1basic.c index 5bcb9009a28..1a873bf25df 100644 --- a/regress/lib/libcrypto/asn1/asn1basic.c +++ b/regress/lib/libcrypto/asn1/asn1basic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1basic.c,v 1.15 2023/08/15 21:05:44 tb Exp $ */ +/* $OpenBSD: asn1basic.c,v 1.16 2024/02/04 13:07:02 tb Exp $ */ /* * Copyright (c) 2017, 2021 Joel Sing * Copyright (c) 2023 Theo Buehler @@ -699,7 +699,7 @@ asn1_integer_null_data_test(void) ASN1_INTEGER *aint = NULL; uint8_t *p = NULL, *pp; int len; - int failed = 0; + int failed = 1; if ((aint = ASN1_INTEGER_new()) == NULL) { fprintf(stderr, "FAIL: ASN1_INTEGER_new() == NULL\n"); -- 2.20.1