← Commit list

7eb0b30934

Daniel Stenberg
Daniel Stenberg
2026-05-12
SUCCESS Duration: 222s

Subject

tool_urlglob: make globbing error reported for correct position

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+2 -2
@@ -99,7 +99,6 @@ static CURLcode glob_set(struct URLGlob *glob, const char **patternp,
bool done = FALSE;
const char *pattern = *patternp;
const char *opattern = pattern;
- size_t opos = *posp - 1;
CURLcode result = CURLE_OK;
size_t size = 0;
char **elem = NULL;
@@ -109,7 +108,7 @@ static CURLcode glob_set(struct URLGlob *glob, const char **patternp,
while(!done) {
switch(*pattern) {
case '\0': /* URL ended while set was still open */
- result = globerror(glob, "unmatched brace", opos, CURLE_URL_MALFORMAT);
+ result = globerror(glob, "unmatched brace", *posp, CURLE_URL_MALFORMAT);
goto error;
case '{':
@@ -527,6 +526,7 @@ static CURLcode glob_parse(struct URLGlob *glob, const char *pattern,
if(p)
return globerror(glob, "Duplicate glob name", 2 + start - ipattern,
CURLE_URL_MALFORMAT);
+ pos += (pattern - start);
}
if(set)
result = glob_set(glob, &pattern, &pos, amount, globindex++, &name);