diff options
author | tjr <tjr@FreeBSD.org> | 2005-08-13 02:30:15 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2005-08-13 02:30:15 +0000 |
commit | d6198362499aa294b7f13daf9ec78432b9756c67 (patch) | |
tree | de776286d694379aa64ca41e5d46e9dbac8df141 | |
parent | f816a6040d6a0f4618f90bed837388889d3fa74e (diff) | |
download | FreeBSD-src-d6198362499aa294b7f13daf9ec78432b9756c67.zip FreeBSD-src-d6198362499aa294b7f13daf9ec78432b9756c67.tar.gz |
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
-rw-r--r-- | lib/libc/regex/regex2.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/regex/regex2.h b/lib/libc/regex/regex2.h index 6beea48..1df7067 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) == '_') |