1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-17 21:22:10 +00:00

fix(crypto/test): fix uninitialized variable use

tests/test_speed.c:61:3: error: ‘sk’ may be used uninitialized [-Werror=maybe-uninitialized]
   61 |   ed25519_publickey(sk, pk);
tests/test_speed.c:145:3: error: ‘sk’ may be used uninitialized [-Werror=maybe-uninitialized]
  145 |   ed25519_publickey(sk, pk);
This commit is contained in:
Martin Milata 2021-12-03 16:42:26 +01:00
parent e43ff4ba8e
commit cace42c6e9

View File

@ -54,7 +54,7 @@ void bench_sign_ed25519(int iterations) {
ed25519_secret_key sk;
ed25519_signature sig;
memcpy(pk,
memcpy(sk,
"\xc5\x5e\xce\x85\x8b\x0d\xdd\x52\x63\xf9\x68\x10\xfe\x14\x43\x7c\xd3"
"\xb5\xe1\xfb\xd7\xc6\xa2\xec\x1e\x03\x1f\x05\xe8\x6d\x8b\xd5",
32);
@ -138,7 +138,7 @@ void bench_verify_ed25519(int iterations) {
ed25519_secret_key sk;
ed25519_signature sig;
memcpy(pk,
memcpy(sk,
"\xc5\x5e\xce\x85\x8b\x0d\xdd\x52\x63\xf9\x68\x10\xfe\x14\x43\x7c\xd3"
"\xb5\xe1\xfb\xd7\xc6\xa2\xec\x1e\x03\x1f\x05\xe8\x6d\x8b\xd5",
32);