From 57b3490e9789b084b44ab4f20456a2dad2ebb323 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Fri, 8 Jan 2016 16:12:22 +0100 Subject: der_coding: always null terminate errorDescription --- lib/coding.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/coding.c b/lib/coding.c index 2dd80ba..b23ca16 100644 --- a/lib/coding.c +++ b/lib/coding.c @@ -1018,6 +1018,9 @@ asn1_der_coding (asn1_node element, const char *name, void *ider, int *len, int err; unsigned char *der = ider; + if (ErrorDescription) + ErrorDescription[0] = 0; + node = asn1_find_node (element, name); if (node == NULL) return ASN1_ELEMENT_NOT_FOUND; -- cgit v1.2.1