z85 encoding buffer overrun

This commit is contained in:
Pieter Hintjens 2013-09-05 15:18:42 +02:00
parent 0a9261472f
commit 9dd324aab2
2 changed files with 2 additions and 2 deletions

View File

@ -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"));

View File

@ -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);