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

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