From dac92472b7b3a0f47ad83117ce6f81b627b60614 Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 13 May 2022 16:39:58 +0000 Subject: [PATCH] Tweak regress in such a way that it would have caught the bug in d2i_ASN1_OBJECT() fixed in a_object.c r1.48. from jsing --- regress/lib/libcrypto/asn1/asn1object.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/regress/lib/libcrypto/asn1/asn1object.c b/regress/lib/libcrypto/asn1/asn1object.c index 4427225b5f3..3005fc31512 100644 --- a/regress/lib/libcrypto/asn1/asn1object.c +++ b/regress/lib/libcrypto/asn1/asn1object.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1object.c,v 1.6 2022/03/19 17:37:10 jsing Exp $ */ +/* $OpenBSD: asn1object.c,v 1.7 2022/05/13 16:39:58 tb Exp $ */ /* * Copyright (c) 2017, 2021, 2022 Joel Sing * @@ -276,6 +276,11 @@ do_asn1_object_test(struct asn1_object_test *aot) fprintf(stderr, "FAIL: d2i_ASN1_OBJECT() failed\n"); goto failed; } + if (p != aot->der + aot->der_len) { + fprintf(stderr, "FAIL: d2i_ASN1_OBJECT() p = %p, want %p\n", + p, aot->der + aot->der_len); + goto failed; + } if (aot->txt != NULL) { ret = i2t_ASN1_OBJECT(buf, sizeof(buf), aobj); -- 2.20.1