Skip to content

Commit

Permalink
Fix _sasl_add_string
Browse files Browse the repository at this point in the history
Issue cyrusimap#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.
  • Loading branch information
GuidoKiener authored and Guido Kiener committed Feb 7, 2021
1 parent 64ef35e commit 30e3be4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/common.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 30e3be4

Please sign in to comment.