diff options
author | Szabolcs Nagy <nsz@port70.net> | 2015-04-18 15:51:16 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2016-01-30 20:53:04 -0500 |
commit | 7eaa76fc2e7993582989d3838b1ac32dd8abac09 (patch) | |
tree | 8d3c0772c1c85b0ba9017fbf919a654a821d8b2d /src/ipc | |
parent | a8cc2253843e30dfbdf0bb2954439d9f2b2e8704 (diff) | |
download | musl-7eaa76fc2e7993582989d3838b1ac32dd8abac09.tar.gz musl-7eaa76fc2e7993582989d3838b1ac32dd8abac09.tar.bz2 musl-7eaa76fc2e7993582989d3838b1ac32dd8abac09.tar.xz musl-7eaa76fc2e7993582989d3838b1ac32dd8abac09.zip |
regex: reject repetitions in some cases with REG_BADRPT
Previously repetitions were accepted after empty expressions like
in (*|?)|{2}, but in BRE the handling of * and \{\} were not
consistent: they were accepted as literals in some cases and
repetitions in others.
It is better to treat repetitions after an empty expression as an
error (this is allowed by the standard, and glibc mostly does the
same). This is hard to do consistently with the current logic so
the new rule is:
Reject repetitions after empty expressions, except after assertions
^*, $? and empty groups ()+ and never treat them as literals.
Empty alternation (|a) is undefined by the standard, but it can be
useful so that should be accepted.
Diffstat (limited to 'src/ipc')
0 files changed, 0 insertions, 0 deletions