From 7c2d630ad11100271e7467c597fcf9191f4aa75c Mon Sep 17 00:00:00 2001 From: Jack Flemming Date: Sun, 26 Jan 2014 20:09:07 -0500 Subject: [PATCH] Fix unset error message --- src/util-decode-der.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util-decode-der.c b/src/util-decode-der.c index 3e7324b..94bcfc7 100644 --- a/src/util-decode-der.c +++ b/src/util-decode-der.c @@ -722,6 +722,9 @@ Asn1Generic * DecodeDer(const unsigned char *buffer, uint32_t size, uint32_t *er Asn1Generic *cert; uint8_t c; + if (errcode) + *errcode = ERR_DER_GENERIC; + /* Check that buffer is an ASN.1 structure (basic checks) */ if (d_ptr[0] != 0x30 && d_ptr[1] != 0x82) /* Sequence */ return NULL; -- 1.8.5.1