mirror of
https://github.com/curl/curl.git
synced 2026-07-22 23:37:17 +03:00
mprintf: remove strlen calls on empty strings in dprintf_formatf
Turns out that in dprintf_formatf we did a strlen on empty strings, a bit strange is how common this actually is, 24 alone when doing a simple GET from https://curl.se Closes #8427
This commit is contained in:
parent
e1667a61ea
commit
186340c9cd
1 changed files with 2 additions and 0 deletions
|
|
@ -829,6 +829,8 @@ static int dprintf_formatf(
|
|||
}
|
||||
else if(prec != -1)
|
||||
len = (size_t)prec;
|
||||
else if(*str == '\0')
|
||||
len = 0;
|
||||
else
|
||||
len = strlen(str);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue