Initialise *out_name at the start of i2t_ASN1_OBJECT_name().
authorjsing <jsing@openbsd.org>
Tue, 15 Mar 2022 18:47:22 +0000 (18:47 +0000)
committerjsing <jsing@openbsd.org>
Tue, 15 Mar 2022 18:47:22 +0000 (18:47 +0000)
ok tb@

lib/libcrypto/asn1/a_object.c

index 9a784fd..120437b 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: a_object.c,v 1.40 2022/03/03 08:06:57 tb Exp $ */
+/* $OpenBSD: a_object.c,v 1.41 2022/03/15 18:47:22 jsing Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -359,6 +359,8 @@ i2t_ASN1_OBJECT_name(const ASN1_OBJECT *aobj, CBB *cbb, const char **out_name)
        const char *name;
        int nid;
 
+       *out_name = NULL;
+
        if ((nid = OBJ_obj2nid(aobj)) == NID_undef)
                return 0;