aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/set/set_api.c3
1 files changed, 3 insertions, 0 deletions
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,
811{ 811{
812 const struct GNUNET_MessageHeader *context_msg; 812 const struct GNUNET_MessageHeader *context_msg;
813 813
814 if (ntohs (msg->header.size) == sizeof (*msg))
815 return GNUNET_OK; /* no context message is OK */
814 context_msg = GNUNET_MQ_extract_nested_mh (msg); 816 context_msg = GNUNET_MQ_extract_nested_mh (msg);
815 if (NULL == context_msg) 817 if (NULL == context_msg)
816 { 818 {
819 /* malformed context message is NOT ok */
817 GNUNET_break_op (0); 820 GNUNET_break_op (0);
818 return GNUNET_SYSERR; 821 return GNUNET_SYSERR;
819 } 822 }