From 69a00f58f5fb67e57dcfb5de753680dca9f004e3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 22 Jan 2017 23:09:50 +0100 Subject: [PATCH] guard against 0 --- src/cadet/gnunet-service-cadet-new.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cadet/gnunet-service-cadet-new.c b/src/cadet/gnunet-service-cadet-new.c index 78d4206f0..76bc4ec48 100644 --- a/src/cadet/gnunet-service-cadet-new.c +++ b/src/cadet/gnunet-service-cadet-new.c @@ -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; -- 2.25.1