mirror of
https://github.com/moparisthebest/curl
synced 2024-11-18 07:25:14 -05:00
c37b66aaae
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: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>
24 lines
197 B
Plaintext
24 lines
197 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
unittest
|
|
infof
|
|
</keywords>
|
|
</info>
|
|
|
|
<client>
|
|
<server>
|
|
none
|
|
</server>
|
|
<features>
|
|
unittest
|
|
</features>
|
|
<name>
|
|
infof
|
|
</name>
|
|
<tool>
|
|
unit1652
|
|
</tool>
|
|
</client>
|
|
</testcase>
|