]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
strerror: Increase STRERROR_LEN 128 -> 256
authorJay Satiro <raysatiro@yahoo.com>
Wed, 12 Feb 2020 21:48:16 +0000 (16:48 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Wed, 12 Feb 2020 21:58:56 +0000 (16:58 -0500)
STRERROR_LEN is the constant used throughout the library to set the size
of the buffer on the stack that the curl strerror functions write to.

Prior to this change some extended length Windows error messages could
be truncated.

Closes https://github.com/curl/curl/pull/4920

lib/strerror.h

index 278c1082f0a6056881974408f2fcad1a9d16fea0..a314327bbd680d340ae4808845fd965826c4c43b 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "urldata.h"
 
-#define STRERROR_LEN 128 /* a suitable length */
+#define STRERROR_LEN 256 /* a suitable length */
 
 const char *Curl_strerror(int err, char *buf, size_t buflen);
 #if defined(WIN32) || defined(_WIN32_WCE)