[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated (460cc8378 -> dd3357659)
From: |
gnunet |
Subject: |
[gnunet] branch master updated (460cc8378 -> dd3357659) |
Date: |
Thu, 01 Dec 2022 08:10:00 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a change to branch master
in repository gnunet.
from 460cc8378 -add FIXME to nat service _unregister; fix printf format in
tcp communicator
new cd32211ab -fix memory leak
new dd3357659 -do not crash on protocol violations
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/testbed/gnunet-service-testbed_barriers.c | 2 ++
src/transport/gnunet-service-tng.c | 27 ++++++++++++++++++++++-----
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/src/testbed/gnunet-service-testbed_barriers.c
b/src/testbed/gnunet-service-testbed_barriers.c
index bc6148087..c024a35e7 100644
--- a/src/testbed/gnunet-service-testbed_barriers.c
+++ b/src/testbed/gnunet-service-testbed_barriers.c
@@ -803,6 +803,7 @@ handle_barrier_cancel (void *cls,
&hash))
{
GNUNET_break_op (0);
+ GNUNET_free (name);
GNUNET_SERVICE_client_drop (client);
return;
}
@@ -811,6 +812,7 @@ handle_barrier_cancel (void *cls,
GNUNET_assert (NULL != barrier);
cancel_wrappers (barrier);
remove_barrier (barrier);
+ GNUNET_free (name);
GNUNET_SERVICE_client_continue (client);
}
diff --git a/src/transport/gnunet-service-tng.c
b/src/transport/gnunet-service-tng.c
index 5976bd5b1..32c8b816d 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -4764,15 +4764,18 @@ dv_encrypt (struct DVKeyState *key, const void *in,
void *dst, size_t in_size)
* @param ciph cipher text to decrypt
* @param[out] out output data to generate (plaintext)
* @param out_size number of bytes of input in @a ciph and available in @a out
+ * @return GNUNET_OK on success
*/
-static void
+static enum GNUNET_GenericReturnValue
dv_decrypt (struct DVKeyState *key,
void *out,
const void *ciph,
size_t out_size)
{
- GNUNET_assert (
- 0 == gcry_cipher_decrypt (key->cipher, out, out_size, ciph, out_size));
+ return (0 ==
+ gcry_cipher_decrypt (key->cipher,
+ out, out_size,
+ ciph, out_size)) ? GNUNET_OK : GNUNET_SYSERR;
}
@@ -8254,8 +8257,22 @@ handle_dv_box (void *cls, const struct
TransportDVBoxMessage *dvb)
GNUNET_assert (hdr_len >=
sizeof(ppay) + sizeof(struct GNUNET_MessageHeader));
- dv_decrypt (key, &ppay, hdr, sizeof(ppay));
- dv_decrypt (key, &body, &hdr[sizeof(ppay)], hdr_len - sizeof(ppay));
+ if (GNUNET_OK != dv_decrypt (key, &ppay, hdr, sizeof(ppay)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Error decrypting DV payload header\n");
+ GNUNET_break_op (0);
+ finish_cmc_handling (cmc);
+ return;
+ }
+ if (GNUNET_OK != dv_decrypt (key, &body, &hdr[sizeof(ppay)], hdr_len -
sizeof(ppay)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Error decrypting DV payload\n");
+ GNUNET_break_op (0);
+ finish_cmc_handling (cmc);
+ return;
+ }
dv_key_clean (key);
if (ntohs (mh->size) != sizeof(body))
{
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] branch master updated (460cc8378 -> dd3357659),
gnunet <=