On Thu, Apr 02, 2026, Martijn van Duren wrote:
> Can you explain why you choose _POSIX_RE_DUP_MAX over RE_DUP_MAX?

No good reason. RE_DUP_MAX is the right one. Updated diff:

Index: usr.bin/awk/b.c
===================================================================
RCS file: /cvs/src/usr.bin/awk/b.c,v
retrieving revision 1.55
diff -u -p -r1.55 b.c
--- usr.bin/awk/b.c     5 Feb 2025 20:32:56 -0000       1.55
+++ usr.bin/awk/b.c
@@ -1461,6 +1461,9 @@ int relex(void)           /* lexical analyzer for
                                        lastre);
                        } else if (isdigit(c)) {
                                num = 10 * num + c - '0';
+                               if (num > RE_DUP_MAX)
+                                       FATAL("repetition count %.20s too 
large",
+                                               lastre);
                                digitfound = true;
                        } else if (c == ',') {
                                if (commafound)

Reply via email to