← Commit list

8025afad8

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2007-04-02
FAILED Duration: 11s

Subject

- use xregcomp. Untested. vda, isn't there a regfree missing here? text data bss dec hex filename 2522 0 0 2522 9da expr.o.r18305 2478 0 0 2478 9ae expr.o

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 →

coreutils/expr.c+2 -2
@@ -226,8 +226,7 @@ of a basic regular expression is not portable; it is being ignored", pv->u.s);
memset(&re_buffer, 0, sizeof(re_buffer));
memset(re_regs, 0, sizeof(*re_regs));
- if (regcomp(&re_buffer, pv->u.s, 0) != 0)
- bb_error_msg_and_die("invalid regular expression");
+ xregcomp(&re_buffer, pv->u.s, 0);
/* expr uses an anchored pattern match, so check that there was a
* match and that the match starts at offset 0. */
@@ -246,6 +245,7 @@ of a basic regular expression is not portable; it is being ignored", pv->u.s);
else
v = int_value(0);
}
+//FIXME: sounds like here is a bit missing: regfree(&re_buffer);
return v;
}