gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated (5c9108a6c -> 3da472669)


From: gnunet
Subject: [gnunet] branch master updated (5c9108a6c -> 3da472669)
Date: Sat, 01 Oct 2022 04:25:44 +0200

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

martin-schanzenbach pushed a change to branch master
in repository gnunet.

    from 5c9108a6c - various return value assertions
     new 817b494b1 - remove dead branch
     new 3da472669 - remove dead branch ecdsa; check return value

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/gns/gnunet-gns-proxy.c  |  1 +
 src/util/crypto_ecc_setup.c | 19 ++++++++++++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c
index c1db1c61e..a834c5c19 100644
--- a/src/gns/gnunet-gns-proxy.c
+++ b/src/gns/gnunet-gns-proxy.c
@@ -1230,6 +1230,7 @@ curl_check_hdr (void *buffer,
       new_cookie_hdr[offset++] = ';';
     }
     hdr_val = new_cookie_hdr;
+    hdr_val[offset] = '\0';
   }
 
   new_location = NULL;
diff --git a/src/util/crypto_ecc_setup.c b/src/util/crypto_ecc_setup.c
index 4f5c9cd74..cee912e90 100644
--- a/src/util/crypto_ecc_setup.c
+++ b/src/util/crypto_ecc_setup.c
@@ -174,7 +174,7 @@ GNUNET_CRYPTO_eddsa_key_from_file (const char *filename,
                       sizeof (*pkey)))
   {
     /* file existed, report that *we* didn't create it... */
-    return (do_create) ? GNUNET_NO : GNUNET_OK;
+    return GNUNET_NO;
   }
   /* give up */
   return GNUNET_SYSERR;
@@ -209,6 +209,10 @@ GNUNET_CRYPTO_ecdsa_key_from_file (const char *filename,
     /* file existed, report that we didn't create it... */
     return (do_create) ? GNUNET_NO : GNUNET_OK;
   }
+  else if (! do_create)
+  {
+    return GNUNET_SYSERR;
+  }
   GNUNET_CRYPTO_ecdsa_key_create (pkey);
   if (GNUNET_OK ==
       GNUNET_DISK_fn_write (filename,
@@ -223,7 +227,7 @@ GNUNET_CRYPTO_ecdsa_key_from_file (const char *filename,
                       sizeof (*pkey)))
   {
     /* file existed, report that *we* didn't create it... */
-    return (do_create) ? GNUNET_NO : GNUNET_OK;
+    return GNUNET_NO;
   }
   /* give up */
   return GNUNET_SYSERR;
@@ -252,9 +256,14 @@ GNUNET_CRYPTO_eddsa_key_create_from_configuration (
                                                &fn))
     return NULL;
   priv = GNUNET_new (struct GNUNET_CRYPTO_EddsaPrivateKey);
-  GNUNET_CRYPTO_eddsa_key_from_file (fn,
-                                     GNUNET_YES,
-                                     priv);
+  if (GNUNET_SYSERR == GNUNET_CRYPTO_eddsa_key_from_file (fn,
+                                                          GNUNET_YES,
+                                                          priv))
+  {
+    GNUNET_free (fn);
+    GNUNET_free (priv);
+    return NULL;
+  }
   GNUNET_free (fn);
   return priv;
 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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