diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-01-08 16:12:22 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-01-08 16:19:26 +0100 |
commit | 57b3490e9789b084b44ab4f20456a2dad2ebb323 (patch) | |
tree | 055f692493ae6b7fb47a48c29ad75a6197e2017b | |
parent | 89aa5bb111a3e7646d6d346945a1d64a70f0eb2c (diff) | |
download | libtasn1-57b3490e9789b084b44ab4f20456a2dad2ebb323.tar.gz |
der_coding: always null terminate errorDescription
-rw-r--r-- | lib/coding.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |