The serial length was one digit too short, resulting in missing digits at the 
end of the certificate's stringified serial number.

Signed-off-by: Adriaan de Jong <dej...@fox-it.com>
---
 ssl_verify_polarssl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ssl_verify_polarssl.c b/ssl_verify_polarssl.c
index 2ba0a5c..4206578 100644
--- a/ssl_verify_polarssl.c
+++ b/ssl_verify_polarssl.c
@@ -121,7 +121,7 @@ x509_get_serial (x509_cert *cert, struct gc_arena *gc)
   int ret = 0;
   int i = 0;
   char *buf = NULL;
-  size_t len = cert->serial.len * 3;
+  size_t len = cert->serial.len * 3 + 1;

   buf = gc_malloc(len, true, gc);

-- 
1.7.5.4


Reply via email to