File curl-7.37.0-CVE-2018-16842.patch of Package curl.12450

From 8490ab449e98b9861a8afdc04f06956e94692ebf Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Sun, 28 Oct 2018 01:33:23 +0200
Subject: [PATCH] voutf: fix bad arethmetic when outputting warnings to stderr

Reported-by: Brian Carpenter
---
 src/tool_msgs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: curl-7.37.0/src/tool_msgs.c
===================================================================
--- curl-7.37.0.orig/src/tool_msgs.c
+++ curl-7.37.0/src/tool_msgs.c
@@ -68,7 +68,7 @@ void warnf(struct OperationConfig *confi
         (void)fwrite(ptr, cut + 1, 1, config->global->errors);
         fputs("\n", config->global->errors);
         ptr += cut+1; /* skip the space too */
-        len -= cut;
+        len -= cut+1;
       }
       else {
         fputs(ptr, config->global->errors);
openSUSE Build Service is sponsored by