Skip to content

Commit d530e92

Browse files
committed
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
1 parent e97679a commit d530e92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/tool_msgs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static void voutf(struct GlobalConfig *config,
6767
(void)fwrite(ptr, cut + 1, 1, config->errors);
6868
fputs("\n", config->errors);
6969
ptr += cut + 1; /* skip the space too */
70-
len -= cut;
70+
len -= cut + 1;
7171
}
7272
else {
7373
fputs(ptr, config->errors);

0 commit comments

Comments
 (0)