Commit c37b66aa authored by Daniel Gustafsson's avatar Daniel Gustafsson
Browse files

infof: clearly indicate truncation



The internal buffer in infof() is limited to 2048 bytes of payload plus
an additional byte for NULL termination. Servers with very long error
messages can however cause truncation of the string, which currently
isn't very clear, and leads to badly formatted output.

This appends a "...\n" (or just "..." in case the format didn't with a
newline char) marker to the end of the string to clearly show
that it has been truncated.

Also include a unittest covering infof() to try and catch any bugs
introduced in this quite important function.

Closes #3216
Reviewed-by: default avatarDaniel Stenberg <daniel@haxx.se>
Reviewed-by: default avatarMarcel Raad <Marcel.Raad@teamviewer.com>
parent d82a17ad
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment