diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-29 20:19:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-29 20:19:03 +0000 |
commit | ec2cba064ca7de430c27a5e979940a937e7dd9b7 (patch) | |
tree | ccc77fb2466eea98a908b626faf01d7da5427560 /src/set | |
parent | 867c67e9f7a0c7a79e70aa6c6d351ee5878c9312 (diff) | |
download | gnunet-ec2cba064ca7de430c27a5e979940a937e7dd9b7.tar.gz gnunet-ec2cba064ca7de430c27a5e979940a937e7dd9b7.zip |
allow empty/NULL context message
Diffstat (limited to 'src/set')
-rw-r--r-- | src/set/set_api.c | 3 |
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 | } |