From 68a4d901347bfa159adfe67e00f149e09800ea22 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 19 Nov 2021 11:47:52 +0100 Subject: -misc bugfixes --- src/util/secmod_common.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/util/secmod_common.c') diff --git a/src/util/secmod_common.c b/src/util/secmod_common.c index 4a45dd58..0bcf9ae5 100644 --- a/src/util/secmod_common.c +++ b/src/util/secmod_common.c @@ -266,6 +266,12 @@ TES_read_work (void *cls, continue; hdr = (const struct GNUNET_MessageHeader *) buf; msize = ntohs (hdr->size); + if (msize < sizeof (struct GNUNET_MessageHeader)) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } + GNUNET_assert (msize <= sizeof (client->iobuf)); } while (off < msize); if (off > msize) -- cgit v1.2.3