mirror of
https://github.com/moparisthebest/curl
synced 2024-12-24 00:58:48 -05:00
voutf: fix bad arethmetic when outputting warnings to stderr
CVE-2018-16842 Reported-by: Brian Carpenter Bug: https://curl.haxx.se/docs/CVE-2018-16842.html
This commit is contained in:
parent
e97679a360
commit
d530e92f59
@ -67,7 +67,7 @@ static void voutf(struct GlobalConfig *config,
|
|||||||
(void)fwrite(ptr, cut + 1, 1, config->errors);
|
(void)fwrite(ptr, cut + 1, 1, config->errors);
|
||||||
fputs("\n", config->errors);
|
fputs("\n", config->errors);
|
||||||
ptr += cut + 1; /* skip the space too */
|
ptr += cut + 1; /* skip the space too */
|
||||||
len -= cut;
|
len -= cut + 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fputs(ptr, config->errors);
|
fputs(ptr, config->errors);
|
||||||
|
Loading…
Reference in New Issue
Block a user