Blame SOURCES/0006-curl-7.61.1-CVE-2018-16839.patch

d73b74
From ad9943254ded9a983af7d581e8a1f3317e8a8781 Mon Sep 17 00:00:00 2001
d73b74
From: Daniel Stenberg <daniel@haxx.se>
d73b74
Date: Fri, 28 Sep 2018 16:08:16 +0200
d73b74
Subject: [PATCH] Curl_auth_create_plain_message: fix too-large-input-check
d73b74
d73b74
CVE-2018-16839
d73b74
Reported-by: Harry Sintonen
d73b74
Bug: https://curl.haxx.se/docs/CVE-2018-16839.html
d73b74
d73b74
Upstream-commit: f3a24d7916b9173c69a3e0ee790102993833d6c5
d73b74
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
d73b74
---
d73b74
 lib/vauth/cleartext.c | 2 +-
d73b74
 1 file changed, 1 insertion(+), 1 deletion(-)
d73b74
d73b74
diff --git a/lib/vauth/cleartext.c b/lib/vauth/cleartext.c
d73b74
index 5d61ce6..1367143 100644
d73b74
--- a/lib/vauth/cleartext.c
d73b74
+++ b/lib/vauth/cleartext.c
d73b74
@@ -74,7 +74,7 @@ CURLcode Curl_auth_create_plain_message(struct Curl_easy *data,
d73b74
   plen = strlen(passwdp);
d73b74
 
d73b74
   /* Compute binary message length. Check for overflows. */
d73b74
-  if((ulen > SIZE_T_MAX/2) || (plen > (SIZE_T_MAX/2 - 2)))
d73b74
+  if((ulen > SIZE_T_MAX/4) || (plen > (SIZE_T_MAX/2 - 2)))
d73b74
     return CURLE_OUT_OF_MEMORY;
d73b74
   plainlen = 2 * ulen + plen + 2;
d73b74
 
d73b74
-- 
d73b74
2.17.2
d73b74