Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions b.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,9 @@ replace_repeat(const uschar *reptok, int reptoklen, const uschar *atom,
static int repeat(const uschar *reptok, int reptoklen, const uschar *atom,
int atomlen, int firstnum, int secondnum)
{
if (atom == NULL)
return 0;

/*
In general, the repetition specifier or "bound" is replaced here
by an equivalent ERE string, repeating the immediately previous atom
Expand Down Expand Up @@ -1459,6 +1462,9 @@ int relex(void) /* lexical analyzer for reparse */
lastre);
} else if (isdigit(c)) {
num = 10 * num + c - '0';
if (num > 255)
FATAL("repetition count %.20s too large",
lastre);
digitfound = true;
} else if (c == ',') {
if (commafound)
Expand Down
1 change: 1 addition & 0 deletions bugs-fixed/repetition-no-atom.awk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/{00}/
4 changes: 4 additions & 0 deletions bugs-fixed/repetition-no-atom.ok
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
awk: illegal primary in regular expression {00} at
source line number 1 source file /usr/src/local/Languages/Awk/awk/bugs-fixed/repetition-no-atom.awk
context is
>>> /{00}/ <<<
1 change: 1 addition & 0 deletions bugs-fixed/repetition-overflow.awk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/a{256}/
4 changes: 4 additions & 0 deletions bugs-fixed/repetition-overflow.ok
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
awk: repetition count a{256} too large
source line number 1 source file /home/millert/a
context is
>>> /a{256}/ <<<