diff --git a/tests/test_security_curve.cpp b/tests/test_security_curve.cpp index 6f6f829b..ce9f1800 100644 --- a/tests/test_security_curve.cpp +++ b/tests/test_security_curve.cpp @@ -53,7 +53,7 @@ static void zap_handler (void *ctx) int size = zmq_recv (zap, client_key, 32, 0); assert (size == 32); - char client_key_text [40]; + char client_key_text [41]; Z85_encode (client_key_text, client_key, 32); assert (streq (version, "1.0")); diff --git a/tools/curve_keygen.c b/tools/curve_keygen.c index 157d6fb2..621d1d84 100644 --- a/tools/curve_keygen.c +++ b/tools/curve_keygen.c @@ -56,7 +56,7 @@ int main (void) int rc = crypto_box_keypair (public_key, secret_key); assert (rc == 0); - char encoded [40]; + char encoded [41]; Z85_encode (encoded, public_key, 32); puts ("\n== CURVE PUBLIC KEY =="); puts (encoded);