diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-23 20:01:41 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-23 20:01:41 +0000 |
commit | fb80a8163d9ff402a4502e29712000d71543fe60 (patch) | |
tree | 79be56085e1ec604fdb83b82e1d2f1c083a2020c | |
parent | 01de5a0922056472969cf23a87241791a6f8cc1f (diff) | |
download | gnunet-fb80a8163d9ff402a4502e29712000d71543fe60.tar.gz gnunet-fb80a8163d9ff402a4502e29712000d71543fe60.zip |
do not crash for #4588
-rw-r--r-- | src/core/core_api.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c index 7699f8b74..451b871fb 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c | |||
@@ -963,6 +963,11 @@ GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, | |||
963 | struct SendMessageRequest *smr; | 963 | struct SendMessageRequest *smr; |
964 | struct GNUNET_MQ_Envelope *env; | 964 | struct GNUNET_MQ_Envelope *env; |
965 | 965 | ||
966 | if (NULL == handle->mq) | ||
967 | { | ||
968 | GNUNET_break (0); /* SEE #4588: do not call NTR from disconnect notification! */ | ||
969 | return NULL; | ||
970 | } | ||
966 | GNUNET_assert (NULL != notify); | 971 | GNUNET_assert (NULL != notify); |
967 | if ( (notify_size > GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE) || | 972 | if ( (notify_size > GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE) || |
968 | (notify_size + sizeof (struct SendMessage) >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ) | 973 | (notify_size + sizeof (struct SendMessage) >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ) |