← Commit list

1098e1044e

Daniel Stenberg
Daniel Stenberg
2026-03-17
SUCCESS Duration: 412s

Subject

tool_urlglob: fix memory-leak on glob range overflow

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_urlglob.c+4 -2
@@ -130,8 +130,10 @@ static CURLcode glob_set(struct URLGlob *glob, const char **patternp,
done = TRUE;
FALLTHROUGH();
case ',':
- if(size >= 100000)
- return globerror(glob, "range overflow", 0, CURLE_URL_MALFORMAT);
+ if(size >= 100000) {
+ result = globerror(glob, "range overflow", 0, CURLE_URL_MALFORMAT);
+ goto error;
+ }
if(!palloc) {
palloc = 5; /* a reasonable default */