gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: take care of odd memset() calls


From: gnunet
Subject: [gnunet] branch master updated: take care of odd memset() calls
Date: Wed, 15 Apr 2020 20:34:00 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 839badf7c take care of odd memset() calls
839badf7c is described below

commit 839badf7cf98669b7945010739d4040a1eeec87a
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Apr 15 20:29:15 2020 +0200

    take care of odd memset() calls
---
 src/util/crypto_hkdf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/util/crypto_hkdf.c b/src/util/crypto_hkdf.c
index 99a50a449..9cdb9d9bc 100644
--- a/src/util/crypto_hkdf.c
+++ b/src/util/crypto_hkdf.c
@@ -210,7 +210,7 @@ GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int 
xtr_algo, int prf_algo,
 
     if (t > 0)
     {
-      memset (plain + k + ctx_len, 1, 1);
+      plain[k + ctx_len] = (char) 1;
 #if DEBUG_HKDF
       dump ("K(1)", plain, plain_len);
 #endif
@@ -225,7 +225,7 @@ GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int 
xtr_algo, int prf_algo,
     for (i = 1; i < t; i++)
     {
       GNUNET_memcpy (plain, result - k, k);
-      memset (plain + k + ctx_len, i + 1, 1);
+      plain[k + ctx_len] = (char) (i + 1);
       gcry_md_reset (prf);
 #if DEBUG_HKDF
       dump ("K(i+1)", plain, plain_len);
@@ -245,7 +245,7 @@ GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int 
xtr_algo, int prf_algo,
         GNUNET_memcpy (plain, result - k, k);
         i++;
       }
-      memset (plain + k + ctx_len, i, 1);
+      plain[k + ctx_len] = (char) i;
       gcry_md_reset (prf);
 #if DEBUG_HKDF
       dump ("K(t):d", plain, plain_len);

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]