gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: Avoid dvision by zero


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: Avoid dvision by zero
Date: Sun, 24 Jun 2018 23:33:56 +0200

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

hernani pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 99f858c66 Avoid dvision by zero
99f858c66 is described below

commit 99f858c66be3206f5660c9d031cd6e6345a1267d
Author: Hernani Marques <address@hidden>
AuthorDate: Sun Jun 24 23:32:01 2018 +0200

    Avoid dvision by zero
---
 src/multicast/gnunet-service-multicast.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/multicast/gnunet-service-multicast.c 
b/src/multicast/gnunet-service-multicast.c
index cf7dde913..b5be257d6 100644
--- a/src/multicast/gnunet-service-multicast.c
+++ b/src/multicast/gnunet-service-multicast.c
@@ -1448,6 +1448,12 @@ check_client_member_join (void *cls,
   uint16_t msg_size = ntohs (msg->header.size);
   struct GNUNET_PeerIdentity *relays = (struct GNUNET_PeerIdentity *) &msg[1];
   uint32_t relay_count = ntohl (msg->relay_count);
+
+  if (0 == relay_count}
+  {
+     GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
   if (UINT32_MAX / relay_count < sizeof (*relays)){
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     "relay_count (%lu) * sizeof (*relays)  (%lu) exceeds 
UINT32_MAX!\n",

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



reply via email to

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