aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/regex
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2005-08-13 02:30:15 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2005-08-13 02:30:15 +0000
commit0853006ff16dccae617b9cda17866fe89ff58310 (patch)
treede776286d694379aa64ca41e5d46e9dbac8df141 /lib/libc/regex
parentb831470b4d7d2159cf5e37d45c83e4bac213e32f (diff)
downloadsrc-0853006ff16dccae617b9cda17866fe89ff58310.tar.gz
src-0853006ff16dccae617b9cda17866fe89ff58310.zip
Change OUT from -2 to CHAR_MIN-1, making it impossible for it to
inadvertently match a negative char in the RE being compiled. This fixes compilation of "\376" (as an ERE) and "\376\376" (as a BRE). PR: 84740 MFC after: 1 week
Notes
Notes: svn path=/head/; revision=149009
Diffstat (limited to 'lib/libc/regex')
-rw-r--r--lib/libc/regex/regex2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/regex/regex2.h b/lib/libc/regex/regex2.h
index 6beea48e3050..1df70679055d 100644
--- a/lib/libc/regex/regex2.h
+++ b/lib/libc/regex/regex2.h
@@ -196,5 +196,5 @@ struct re_guts {
};
/* misc utilities */
-#define OUT (-2) /* a non-character value */
+#define OUT (CHAR_MIN - 1) /* a non-character value */
#define ISWORD(c) (iswalnum((uch)(c)) || (c) == '_')