Opened 8 years ago
#375 new enhancement
Add newer regex support
Reported by: | dmik | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | new |
Component: | libc | Version: | 0.6.6 |
Severity: | normal | Keywords: | |
Cc: |
Description
Versions of regcomp()/regexec()/etc in kLIBC seem to be quite old. In particular, they don't support the range [A-~] (i.e. all characters between ASCII A and ASCII ~ (tilde)) complaining with regex error 11 (Invalid range end). This was discovered when using the file magic database (magic.mgc) from file v5.30 in rpmbuild (this magic.mgc contains bioinformatics magic data which contains the following regex that fails: ^[!-?A-~]{1,255}(\t[^\t]+){11}
).
A temporary workaround is to replace the faulty regex with ^[!-?A-Z\[\\\]\^_a-z\{|\}~]{1,255}(\t[^\t]+){11}
and rebuild magic.mgc.
For the time being, LIBCx will provide newer overrides (see https://github.com/bitwiseworks/libcx/issues/35).