From ec2cba064ca7de430c27a5e979940a937e7dd9b7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 29 Jun 2016 20:19:03 +0000 Subject: [PATCH] allow empty/NULL context message --- src/set/set_api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/set/set_api.c b/src/set/set_api.c index af4907dea..4f0cebb57 100644 --- a/src/set/set_api.c +++ b/src/set/set_api.c @@ -811,9 +811,12 @@ check_request (void *cls, { const struct GNUNET_MessageHeader *context_msg; + if (ntohs (msg->header.size) == sizeof (*msg)) + return GNUNET_OK; /* no context message is OK */ context_msg = GNUNET_MQ_extract_nested_mh (msg); if (NULL == context_msg) { + /* malformed context message is NOT ok */ GNUNET_break_op (0); return GNUNET_SYSERR; } -- 2.25.1