diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-11-13 17:25:46 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-11-13 17:25:46 +0000 |
commit | deeb4aae693e746cec733826c2b90d9214a27dd9 (patch) | |
tree | 5e09066397827d21400ca7d5cb5ac6899ee4b261 /posix | |
parent | b27eea96b9046ee6adf1d4906d774204447a2fa6 (diff) | |
download | glibc-deeb4aae693e746cec733826c2b90d9214a27dd9.tar.gz glibc-deeb4aae693e746cec733826c2b90d9214a27dd9.tar.xz glibc-deeb4aae693e746cec733826c2b90d9214a27dd9.zip |
(parse_dup_op): Fail with REG_BADBR is first number in {,} expression is larger.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/regcomp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c index 9a48aa3f3b..0dee2e62fc 100644 --- a/posix/regcomp.c +++ b/posix/regcomp.c @@ -2412,6 +2412,12 @@ parse_dup_op (dup_elem, regexp, dfa, token, syntax, err) goto parse_dup_op_espace; } } + else if (BE (start > end, 0)) + { + /* First number greater than first. */ + *err = REG_BADBR; + return NULL; + } else if (end - start > 0) { /* Then extract "<re>{0,m}" to "<re>?<re>?...<re>?". */ |