From: inoguchi Date: Sun, 10 Apr 2022 12:42:33 +0000 (+0000) Subject: Set ASN1_OBJECT_FLAG_DYNAMIC_DATA flag with t2i_ASN1_OBJECT_internal X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e35036c02dc104bc61903d370b38b32356ee821d;p=openbsd Set ASN1_OBJECT_FLAG_DYNAMIC_DATA flag with t2i_ASN1_OBJECT_internal 'flags' should have ASN1_OBJECT_FLAG_DYNAMIC_DATA bit to free 'data' by ASN1_OBJECT_free as c2i_ASN1_OBJECT_cbs does. ok jsing@ tb@ --- diff --git a/lib/libcrypto/asn1/a_object.c b/lib/libcrypto/asn1/a_object.c index 0cf649910b7..c6e4c77f92e 100644 --- a/lib/libcrypto/asn1/a_object.c +++ b/lib/libcrypto/asn1/a_object.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_object.c,v 1.45 2022/03/26 14:54:58 jsing Exp $ */ +/* $OpenBSD: a_object.c,v 1.46 2022/04/10 12:42:33 inoguchi Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -482,6 +482,7 @@ t2i_ASN1_OBJECT_internal(const char *oid) aobj->data = data; aobj->length = (int)data_len; + aobj->flags |= ASN1_OBJECT_FLAG_DYNAMIC_DATA; data = NULL; err: