[rs-commit] r55 - /mod_pkcs12/trunk/mod_pkcs12.c

rs-commit at redwax.eu rs-commit at redwax.eu
Thu Apr 25 13:48:31 CEST 2019


Author: minfrin at redwax.eu
Date: Thu Apr 25 13:48:30 2019
New Revision: 55

Log:
Make sure challenge is NUL terminated for benefit of PKCS12_create().

Modified:
    mod_pkcs12/trunk/mod_pkcs12.c

Modified: mod_pkcs12/trunk/mod_pkcs12.c
==============================================================================
--- mod_pkcs12/trunk/mod_pkcs12.c	(original)
+++ mod_pkcs12/trunk/mod_pkcs12.c	Thu Apr 25 13:48:30 2019
@@ -902,7 +902,7 @@
 
             apr_brigade_length(pair->value, 1, &offset);
             challenge_size = (apr_size_t) offset;
-            challenge = apr_palloc(r->pool, challenge_size);
+            challenge = apr_pcalloc(r->pool, challenge_size + 1);
             apr_brigade_flatten(pair->value, (char *)challenge, &challenge_size);
 
         }



More information about the rs-commit mailing list