gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated: add guard logic to


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: add guard logic to check sizeof(value) is sufficient (should be -- size is 20, needed are 5, but still the new code is strictly safer even if slower)
Date: Mon, 03 Jun 2019 11:20:50 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 01e8e930 add guard logic to check sizeof(value) is sufficient (should 
be -- size is 20, needed are 5, but still the new code is strictly safer even 
if slower)
01e8e930 is described below

commit 01e8e930dc674684e545637d128b354d482efde6
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jun 3 11:20:47 2019 +0200

    add guard logic to check sizeof(value) is sufficient (should be -- size is 
20, needed are 5, but still the new code is strictly safer even if slower)
---
 src/bank-lib/bank_api_history.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/bank-lib/bank_api_history.c b/src/bank-lib/bank_api_history.c
index 2520fa16..7cf16966 100644
--- a/src/bank-lib/bank_api_history.c
+++ b/src/bank-lib/bank_api_history.c
@@ -366,11 +366,13 @@ conv_cancel (enum TALER_BANK_Direction direction)
 
   if (TALER_BANK_DIRECTION_CANCEL ==
       (TALER_BANK_DIRECTION_CANCEL & direction))
-    strcpy (&ret.value[0],
-            "show");
+    GNUNET_snprintf (ret.value,
+                     sizeof (ret.value),
+                     "show");
   else
-    strcpy (&ret.value[0],
-            "omit");
+    GNUNET_snprintf (ret.value,
+                     sizeof (ret.value),
+                     "omit");
   return ret;
 }
 

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



reply via email to

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