Properly initialize buffers.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 13 Apr 2014 10:09:48 +0000 (12:09 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 13 Apr 2014 10:09:48 +0000 (12:09 +0200)
Valgrind complained about use of uninitialized data.

src/sptps_speed.c

index 268e6c9..d9776b7 100644 (file)
@@ -82,6 +82,10 @@ int main(int argc, char *argv[]) {
 
        crypto_init();
 
+       randomize(buf1, sizeof buf1);
+       randomize(buf2, sizeof buf2);
+       randomize(buf3, sizeof buf3);
+
        // Key generation
 
        fprintf(stderr, "Generating keys for %lg seconds: ", duration);