Lines 414-419 Lines 440-448 Lines 454-462 Lines 621-627 (-)lib/libc/regex/regcomp.c (-6 / +5 lines) 414 ` case '*':` 414 ` case '*':` 415 ` case '+':` 415 ` case '+':` 416 ` case '?':` 416 ` case '?':` 417 ` case '{':` 417 ` SETERROR(REG_BADRPT);` 418 ` SETERROR(REG_BADRPT);` 418 ` break;` 419 ` break;` 419 ` case '.':` 420 ` case '.':` 440 ` break;` 441 ` break;` 441 ` }` 442 ` }` 442 ` break;` 443 ` break;` 443 ` case '{': /* okay as ordinary except if digit follows */` 444 ` (void)REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);` 445 ` /* FALLTHROUGH */` 446 ` default:` 444 ` default:` 447 ` p->next--;` 445 ` p->next--;` 448 ` wc = WGETNEXT();` 446 ` wc = WGETNEXT();` 454 ` return;` 452 ` return;` 455 ` c = PEEK();` 453 ` c = PEEK();` 456 ` /* we call { a repetition if followed by a digit */` 454 ` /* we call { a repetition if followed by a digit */` 457 ` if (!( c == '*' || c == '+' || c == '?' ||` 455 ` if (!( c == '*' || c == '+' || c == '?' || c == '{'))` 458 ` (c == '{' && MORE2() && isdigit((uch)PEEK2())) ))` 459 ` return; /* no repetition, we're done */` 456 ` return; /* no repetition, we're done */` 457 ` else if (c == '{')` 458 ` (void)REQUIRE(MORE2() && \` 459 ` (isdigit((uch)PEEK2()) || PEEK2() == ','), REG_BADRPT);` 460 ` NEXT();` 460 ` NEXT();` 461 461 462 ` (void)REQUIRE(!wascaret, REG_BADRPT);` 462 ` (void)REQUIRE(!wascaret, REG_BADRPT);` 621 ` (void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN);` 621 ` (void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN);` 622 ` break;` 622 ` break;` 623 ` case BACKSL|')': /* should not get here -- must be user */` 623 ` case BACKSL|')': /* should not get here -- must be user */` 624 ` case BACKSL|'}':` 625 ` SETERROR(REG_EPAREN);` 624 ` SETERROR(REG_EPAREN);` 626 ` break;` 625 ` break;` 627 ` case BACKSL|'1':` 626 ` case BACKSL|'1':`