guard against 0
authorChristian Grothoff <christian@grothoff.org>
Sun, 22 Jan 2017 22:09:50 +0000 (23:09 +0100)
committerChristian Grothoff <christian@grothoff.org>
Sun, 22 Jan 2017 22:10:33 +0000 (23:10 +0100)
src/cadet/gnunet-service-cadet-new.c

index 78d4206f007b78ec9a7e9ec7c12731bf7932bba4..76bc4ec48e48163695328974cc6cc348f87565cd 100644 (file)
@@ -644,7 +644,8 @@ check_data (void *cls,
                    buf,
                    sizeof (pa));
     payload_claimed_size = ntohs (pa.size);
-    if (payload_size < payload_claimed_size)
+    if ( (payload_size < payload_claimed_size) ||
+         (0 == payload_claimed_size) )
     {
       GNUNET_break_op (0);
       return GNUNET_SYSERR;