FreeBSD Bugzilla – Attachment 181601 Details for
Bug 218495
[exp-run] Test for regex changes in D10315
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
libc/regex changes
regex.diff (text/plain), 1.16 KB, created by
Pedro F. Giffuni
on 2017-04-08 16:14:49 UTC
(
hide
)
Description:
libc/regex changes
Filename:
MIME Type:
Creator:
Pedro F. Giffuni
Created:
2017-04-08 16:14:49 UTC
Size:
1.16 KB
patch
obsolete
>Index: lib/libc/regex/regcomp.c >=================================================================== >--- lib/libc/regex/regcomp.c >+++ lib/libc/regex/regcomp.c >@@ -414,6 +414,7 @@ > case '*': > case '+': > case '?': >+ case '{': > SETERROR(REG_BADRPT); > break; > case '.': >@@ -440,9 +441,6 @@ > break; > } > break; >- case '{': /* okay as ordinary except if digit follows */ >- (void)REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT); >- /* FALLTHROUGH */ > default: > p->next--; > wc = WGETNEXT(); >@@ -454,9 +452,11 @@ > return; > c = PEEK(); > /* we call { a repetition if followed by a digit */ >- if (!( c == '*' || c == '+' || c == '?' || >- (c == '{' && MORE2() && isdigit((uch)PEEK2())) )) >+ if (!( c == '*' || c == '+' || c == '?' || c == '{')) > return; /* no repetition, we're done */ >+ else if (c == '{') >+ (void)REQUIRE(MORE2() && \ >+ (isdigit((uch)PEEK2()) || PEEK2() == ','), REG_BADRPT); > NEXT(); > > (void)REQUIRE(!wascaret, REG_BADRPT); >@@ -621,7 +621,6 @@ > (void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN); > break; > case BACKSL|')': /* should not get here -- must be user */ >- case BACKSL|'}': > SETERROR(REG_EPAREN); > break; > case BACKSL|'1':
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 218495
: 181601