gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 334/411: curl_easy_escape: limit output string length to 3 * max


From: gnunet
Subject: [gnurl] 334/411: curl_easy_escape: limit output string length to 3 * max input
Date: Wed, 13 Jan 2021 01:22:29 +0100

This is an automated email from the git hooks/post-receive script.

nikita pushed a commit to branch master
in repository gnurl.

commit 7ae59838f0b9af600f3936485ad45de86bd3435f
Author: Daniel Stenberg <daniel@haxx.se>
AuthorDate: Mon Nov 9 16:24:13 2020 +0100

    curl_easy_escape: limit output string length to 3 * max input
    
    ... instead of the limiting it to just the max input size. As every
    input byte can be expanded to 3 output bytes, this could limit the input
    string to 2.66 MB instead of the intended 8 MB.
    
    Reported-by: Marc Schlatter
    Closes #6192
---
 lib/escape.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/escape.c b/lib/escape.c
index 1ec698aa6..683b6fc4a 100644
--- a/lib/escape.c
+++ b/lib/escape.c
@@ -86,7 +86,7 @@ char *curl_easy_escape(struct Curl_easy *data, const char 
*string,
   if(inlength < 0)
     return NULL;
 
-  Curl_dyn_init(&d, CURL_MAX_INPUT_LENGTH);
+  Curl_dyn_init(&d, CURL_MAX_INPUT_LENGTH * 3);
 
   length = (inlength?(size_t)inlength:strlen(string));
   if(!length)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]