From f5d9ced33c7a3cbc56764cface72c181c7f02b3d Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Tue, 2 Mar 2021 21:12:02 -0600 Subject: [PATCH] asn1: Fix broken printing --- lib/asn1/template.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/asn1/template.c b/lib/asn1/template.c index 0c3747635..818a200e8 100644 --- a/lib/asn1/template.c +++ b/lib/asn1/template.c @@ -2452,6 +2452,9 @@ _asn1_print(const struct asn1_template *t, tnames = tbase + nelements - nnames + 1; + if (!r) + r = rk_strpoolprintf(r, "%s", ""); + if (nnames) r = rk_strpoolprintf(r, "%s{\"_type\":\"%s\"", indents ? indents : "",