libcurl supports up to 8MB string inputs, the config file accepts up to
10MB line lengths. It did not make sense to limit the globs to a maximum
of one megabyte.
Closes #19960
#endif
#endif
+#define MAX_CONFIG_LINE_LENGTH (10*1024*1024)
+
#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
#define tool_safefree(ptr) \
return 0; /* ok */
}
-#define MAX_CONFIG_LINE_LENGTH (10*1024*1024)
-
/* return 0 on everything-is-fine, and non-zero otherwise */
ParameterError parseconfig(const char *filename, int max_recursive,
char **resolved)
CURLcode res;
memset(glob, 0, sizeof(struct URLGlob));
- curlx_dyn_init(&glob->buf, 1024 * 1024);
+ curlx_dyn_init(&glob->buf, MAX_CONFIG_LINE_LENGTH);
glob->pattern = curlx_malloc(2 * sizeof(struct URLPattern));
if(!glob->pattern)
return CURLE_OUT_OF_MEMORY;