diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2022-05-13 16:39:59 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2022-05-13 16:39:59 +0000 |
commit | 519949a9daf87d115b08955b5c7117423bf486a4 (patch) | |
tree | d817ea8bfa6b0cef490e6471842b23778caab011 /regress | |
parent | 7c0eb3fd80027dc467dc546a0eb35554a5658870 (diff) |
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
Diffstat (limited to 'regress')
-rw-r--r-- | regress/lib/libcrypto/asn1/asn1object.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 <jsing@openbsd.org> * @@ -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); |