]> granicus.if.org Git - curl/commitdiff
netrc: use a larger buffer
authorDaniel Stenberg <daniel@haxx.se>
Sat, 23 Jun 2018 19:32:22 +0000 (21:32 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 23 Jun 2018 20:50:31 +0000 (22:50 +0200)
... to work with longer passwords etc. Grow it from a 256 to a 4096
bytes buffer.

Reported-by: Dario Nieuwenhuis
Fixes #2676
Closes #2680

lib/netrc.c

index dbcc59ac930f5ae63dc8372f51c94f0f751db255..a407bdaacc9c11cbcc957e81e73b66dc0724ba07 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -115,7 +115,7 @@ int Curl_parsenetrc(const char *host,
     char *tok;
     char *tok_buf;
     bool done = FALSE;
-    char netrcbuffer[256];
+    char netrcbuffer[4096];
     int  netrcbuffsize = (int)sizeof(netrcbuffer);
 
     while(!done && fgets(netrcbuffer, netrcbuffsize, file)) {