From 014b201d3ee412f29311f8f0b72bf3aa6be83b7f Mon Sep 17 00:00:00 2001 From: sigiesec Date: Wed, 16 Aug 2017 12:36:28 +0200 Subject: [PATCH] Problem: ZAP message without credentials is not terminated Solution: Set more flag depending on presence of credentials --- src/zap_client.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/zap_client.cpp b/src/zap_client.cpp index d8120d8b..d8fb30e0 100644 --- a/src/zap_client.cpp +++ b/src/zap_client.cpp @@ -105,7 +105,8 @@ int zap_client_t::send_zap_request (const char *mechanism, rc = msg.init_size (mechanism_length); errno_assert (rc == 0); memcpy (msg.data (), mechanism, mechanism_length); - msg.set_flags (msg_t::more); + if (credentials) + msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); if (rc != 0) return close_and_return (&msg, -1);