From 89aa5bb111a3e7646d6d346945a1d64a70f0eb2c Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Fri, 8 Jan 2016 16:12:22 +0100 Subject: asn1_array2tree: always null terminate errorDescription --- lib/structure.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/structure.c b/lib/structure.c index ffb6aa5..eec10db 100644 --- a/lib/structure.c +++ b/lib/structure.c @@ -183,6 +183,8 @@ asn1_array2tree (const asn1_static_node * array, asn1_node * definitions, int result; unsigned int type; + if (errorDescription) + errorDescription[0] = 0; if (*definitions != NULL) return ASN1_ELEMENT_NOT_EMPTY; -- cgit v1.2.1