Fix a nasty quirk in ASN1_STRING_copy(3).
authorschwarze <schwarze@openbsd.org>
Sat, 13 Nov 2021 20:44:00 +0000 (20:44 +0000)
committerschwarze <schwarze@openbsd.org>
Sat, 13 Nov 2021 20:44:00 +0000 (20:44 +0000)
commitfeb138ef8af09e31ca863424c7c9df1aac0d016c
tree02857dc30937c53daeb3676270f1a4430828495e
parent61583fc45b9b3a6ace29dc07faf0dcb5a6ad3205
Fix a nasty quirk in ASN1_STRING_copy(3).
In case of failure, it reported the failure
but corrupted the type of the destination string.
Instead, let's make sure that in case of failure,
existing objects remain in their original state.

OK tb@
lib/libcrypto/asn1/asn1_lib.c