mirror of
https://github.com/curl/curl.git
synced 2026-08-25 13:53:37 +03:00
'mytx' in bug report #1723194 (http://curl.haxx.se/bug/view.cgi?id=1723194)
pointed out that the warnf() function in the curl tool didn't properly deal with the cases when excessively long words were used in the string to chop up.
This commit is contained in:
parent
380e132da3
commit
70b1900dd1
2 changed files with 10 additions and 0 deletions
|
|
@ -501,6 +501,10 @@ static void warnf(struct Configurable *config, const char *fmt, ...)
|
|||
while(!ISSPACE(ptr[cut]) && cut) {
|
||||
cut--;
|
||||
}
|
||||
if(0 == cut)
|
||||
/* not a single cutting position was found, just cut it at the
|
||||
max text width then! */
|
||||
cut = WARN_TEXTWIDTH-1;
|
||||
|
||||
fwrite(ptr, cut + 1, 1, config->errors);
|
||||
fputs("\n", config->errors);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue