Commit 9dd324aa authored by Pieter Hintjens's avatar Pieter Hintjens

z85 encoding buffer overrun

parent 0a926147
...@@ -53,7 +53,7 @@ static void zap_handler (void *ctx) ...@@ -53,7 +53,7 @@ static void zap_handler (void *ctx)
int size = zmq_recv (zap, client_key, 32, 0); int size = zmq_recv (zap, client_key, 32, 0);
assert (size == 32); assert (size == 32);
char client_key_text [40]; char client_key_text [41];
Z85_encode (client_key_text, client_key, 32); Z85_encode (client_key_text, client_key, 32);
assert (streq (version, "1.0")); assert (streq (version, "1.0"));
......
...@@ -56,7 +56,7 @@ int main (void) ...@@ -56,7 +56,7 @@ int main (void)
int rc = crypto_box_keypair (public_key, secret_key); int rc = crypto_box_keypair (public_key, secret_key);
assert (rc == 0); assert (rc == 0);
char encoded [40]; char encoded [41];
Z85_encode (encoded, public_key, 32); Z85_encode (encoded, public_key, 32);
puts ("\n== CURVE PUBLIC KEY =="); puts ("\n== CURVE PUBLIC KEY ==");
puts (encoded); puts (encoded);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment