From 15ea7748496d5ba97d32f78e6fc95bb1a49a182e Mon Sep 17 00:00:00 2001 From: Guido Kiener Date: Mon, 25 Jan 2021 17:57:02 +0100 Subject: [PATCH] Fix _sasl_add_string Issue #587 was not solved correct. _sasl_add_string adds zero terminator to the output string. This cuts log messages after the first '%s' of the format string. With the fix the function _sasl_log now logs the complete message. Signed-off-by: Guido Kiener --- lib/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.c b/lib/common.c index d1b028fe..deb94eec 100644 --- a/lib/common.c +++ b/lib/common.c @@ -195,7 +195,7 @@ int _sasl_add_string(char **out, size_t *alloclen, return SASL_NOMEM; strncpy(*out + *outlen, add, addlen); - *outlen += addlen; + *outlen += addlen-1; return SASL_OK; }