diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-25 15:03:01 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-25 15:03:01 +0900 |
commit | 3ae41c6868db101c0b7d5cabc0776a376654bf5d (patch) | |
tree | 734e1c75a5ef481a2028a0e4121fdc1141d85575 /src/revocation/gnunet-revocation-tvg.c | |
parent | 7a1793b347a72ec0b3437effe6faeb4170f1c445 (diff) | |
download | gnunet-3ae41c6868db101c0b7d5cabc0776a376654bf5d.tar.gz gnunet-3ae41c6868db101c0b7d5cabc0776a376654bf5d.zip |
- address coverity findings !coverity
Diffstat (limited to 'src/revocation/gnunet-revocation-tvg.c')
-rw-r--r-- | src/revocation/gnunet-revocation-tvg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/revocation/gnunet-revocation-tvg.c b/src/revocation/gnunet-revocation-tvg.c index a34a6bc98..682f41530 100644 --- a/src/revocation/gnunet-revocation-tvg.c +++ b/src/revocation/gnunet-revocation-tvg.c | |||
@@ -107,6 +107,7 @@ run (void *cls, | |||
107 | struct GNUNET_REVOCATION_PowCalculationHandle *ph; | 107 | struct GNUNET_REVOCATION_PowCalculationHandle *ph; |
108 | struct GNUNET_TIME_Relative exp; | 108 | struct GNUNET_TIME_Relative exp; |
109 | char ztld[128]; | 109 | char ztld[128]; |
110 | ssize_t key_len; | ||
110 | 111 | ||
111 | id_priv.type = htonl (GNUNET_IDENTITY_TYPE_ECDSA); | 112 | id_priv.type = htonl (GNUNET_IDENTITY_TYPE_ECDSA); |
112 | GNUNET_CRYPTO_ecdsa_key_create (&id_priv.ecdsa_key); | 113 | GNUNET_CRYPTO_ecdsa_key_create (&id_priv.ecdsa_key); |
@@ -121,7 +122,9 @@ run (void *cls, | |||
121 | print_bytes_ (&id_priv.ecdsa_key, sizeof(id_priv.ecdsa_key), 8, 1); | 122 | print_bytes_ (&id_priv.ecdsa_key, sizeof(id_priv.ecdsa_key), 8, 1); |
122 | fprintf (stdout, "\n"); | 123 | fprintf (stdout, "\n"); |
123 | fprintf (stdout, "Zone identifier (ztype|zkey):\n"); | 124 | fprintf (stdout, "Zone identifier (ztype|zkey):\n"); |
124 | print_bytes (&id_pub, GNUNET_IDENTITY_key_get_length (&id_pub), 8); | 125 | key_len = GNUNET_IDENTITY_key_get_length (&id_pub); |
126 | GNUNET_assert (0 < key_len); | ||
127 | print_bytes (&id_pub, key_len, 8); | ||
125 | fprintf (stdout, "\n"); | 128 | fprintf (stdout, "\n"); |
126 | fprintf (stdout, "Encoded zone identifier (zkl = zTLD):\n"); | 129 | fprintf (stdout, "Encoded zone identifier (zkl = zTLD):\n"); |
127 | fprintf (stdout, "%s\n", ztld); | 130 | fprintf (stdout, "%s\n", ztld); |