diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-11-19 11:47:52 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-11-19 11:47:52 +0100 |
commit | 68a4d901347bfa159adfe67e00f149e09800ea22 (patch) | |
tree | 9f966c9c1ea7f15954552d0832a7ef1414549735 /src/util/secmod_common.c | |
parent | bdaaa0f6cb8f99168ed9916064a5e4145426480c (diff) |
-misc bugfixes
Diffstat (limited to 'src/util/secmod_common.c')
-rw-r--r-- | src/util/secmod_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) |