Skip to content

Commit

Permalink
Fix _sasl_add_string
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
GuidoKiener authored and quanah committed Jun 26, 2021
1 parent 8985098 commit 15ea774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/common.c
Original file line number Diff line number Diff line change
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 15ea774

Please sign in to comment.