← Commit list

28d27570fa

Daniel Stenberg
Daniel Stenberg
2025-12-13
SUCCESS Duration: 200s

Subject

tool_urlglob: support globs as long as config line lengths

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

src/tool_cfgable.h+2 -0
@@ -38,6 +38,8 @@
#endif
#endif
+#define MAX_CONFIG_LINE_LENGTH (10*1024*1024)
+
#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
#define tool_safefree(ptr) \
src/tool_parsecfg.c+0 -2
@@ -77,8 +77,6 @@ static int unslashquote(const char *line, struct dynbuf *param)
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)
src/tool_urlglob.c+1 -1
@@ -500,7 +500,7 @@ CURLcode glob_url(struct URLGlob *glob, char *url, curl_off_t *urlnum,
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;