gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: fix wrong condition


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: fix wrong condition
Date: Wed, 04 Jul 2018 20:05:08 +0200

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

xrs pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 61421b558 fix wrong condition
61421b558 is described below

commit 61421b558cfd8b0f31328f4d99d045990bd311de
Author: xrs <address@hidden>
AuthorDate: Wed Jul 4 20:04:52 2018 +0200

    fix wrong condition
---
 src/multicast/gnunet-service-multicast.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/multicast/gnunet-service-multicast.c 
b/src/multicast/gnunet-service-multicast.c
index 20d29b906..f8441cc2b 100644
--- a/src/multicast/gnunet-service-multicast.c
+++ b/src/multicast/gnunet-service-multicast.c
@@ -1449,17 +1449,15 @@ check_client_member_join (void *cls,
   struct GNUNET_PeerIdentity *relays = (struct GNUNET_PeerIdentity *) &msg[1];
   uint32_t relay_count = ntohl (msg->relay_count);
 
-  if (0 == 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",
-              (unsigned long)relay_count,
-              sizeof (*relays));
-      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",
+                (unsigned long)relay_count,
+                sizeof (*relays));
+        return GNUNET_SYSERR;
+    }
   }
   uint32_t relay_size = relay_count * sizeof (*relays);
   struct GNUNET_MessageHeader *join_msg = NULL;

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



reply via email to

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