RPS service: Get length of buffer, not of string
authorJulius Bünger <buenger@mytum.de>
Thu, 21 Feb 2019 13:31:10 +0000 (14:31 +0100)
committerJulius Bünger <buenger@mytum.de>
Thu, 21 Feb 2019 13:31:10 +0000 (14:31 +0100)
src/rps/gnunet-service-rps.c

index fe863c5f4138b957bc69d6d63b1b83896bee85c3..194a5669cfd80fed73ad2b0edb8fd769c018f03d 100644 (file)
@@ -2848,7 +2848,7 @@ new_sub (const struct GNUNET_HashCode *hash,
     char str_hash[105];
 
     GNUNET_snprintf (str_hash,
-                    strlen (str_hash),
+                    sizeof (str_hash),
                     GNUNET_h2s_full (hash));
     tmp_filename_valid_peers = sub->filename_valid_peers;
     GNUNET_asprintf (&sub->filename_valid_peers,