mirror of
https://github.com/curl/curl.git
synced 2025-02-17 14:59:45 +08: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
@ -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…
Reference in New Issue
Block a user