summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-01-08 16:12:22 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-01-08 16:12:22 +0100
commit89aa5bb111a3e7646d6d346945a1d64a70f0eb2c (patch)
tree76fe4b5f188ea71605fd994be4e6c66a330c194c
parented211d7c9b6e186106870e24a9e60f9b5b952a03 (diff)
downloadlibtasn1-89aa5bb111a3e7646d6d346945a1d64a70f0eb2c.tar.gz
asn1_array2tree: always null terminate errorDescription
-rw-r--r--lib/structure.c2
1 files changed, 2 insertions, 0 deletions
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;