freebsd-nq/lib/libc
Yuri Pankov 547bc083d6 regcomp: reduce size of bitmap for multibyte locales
This fixes the obscure endless loop seen with case-insensitive
patterns containing characters in 128-255 range;  originally
found running GNU grep test suite.

Our regex implementation being kludgy translates the characters
in case-insensitive pattern to bracket expression containing both
cases for the character and doesn't correctly handle the case when
original character is in bitmap and the other case is not, falling
into the endless loop going through in p_bracket(), ordinary(),
and bothcases().

Reducing the bitmap to 0-127 range for multibyte locales solves this
as none of these characters have other case mapping outside of bitmap.
We are also safe in the case when the original character outside of
bitmap has other case mapping in the bitmap (there are several of those
in our current ctype maps having unidirectional mapping into bitmap).

Reviewed by:	bapt, kevans, pfg
Differential revision:	https://reviews.freebsd.org/D18302
2018-12-12 04:23:00 +00:00
..
aarch64 Don't export _end on arm64 and riscv. 2018-06-01 23:42:10 +00:00
amd64 Remove MD __sys_* private symbols. 2018-12-05 00:46:09 +00:00
arm Remove MD __sys_* private symbols. 2018-12-05 00:46:09 +00:00
capability Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
compat-43 General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
db Remove "All rights reserved" from my files. 2018-05-10 06:41:08 +00:00
gdtoa libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
gen syslog(3): stdarg.h is needed only for vsyslog() 2018-12-06 18:03:18 +00:00
gmon mcount: tidy up ANSIfication 2018-10-20 22:39:35 +00:00
i386 Remove MD __sys_* private symbols. 2018-12-05 00:46:09 +00:00
iconv libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
include Update userland arc4random() with OpenBSD's Chacha20 based arc4random(). 2018-08-19 17:40:50 +00:00
inet libc: fix cases of undefined behavior. 2018-08-07 15:24:19 +00:00
isc SPDX: more ISC-related files. 2017-12-08 17:52:53 +00:00
locale Fix WITHOUT_ICONV build after r340276. 2018-11-14 09:06:15 +00:00
md Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
mips Remove MD __sys_* private symbols. 2018-12-05 00:46:09 +00:00
nameser SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
net Style cleanup. 2018-11-27 09:41:47 +00:00
nls
posix1e Move mac.conf to lib/libc/posix1e/ 2018-09-18 01:40:37 +00:00
powerpc Remove MD __sys_* private symbols. 2018-12-05 00:46:09 +00:00
powerpc64 Remove MD __sys_* private symbols. 2018-12-05 00:46:09 +00:00
powerpcspe Fix fabs(3) for powerpcspe, this time for real 2018-07-26 14:42:20 +00:00
quad ANSIfy libc/quad 2018-10-21 00:20:40 +00:00
regex regcomp: reduce size of bitmap for multibyte locales 2018-12-12 04:23:00 +00:00
resolv Allow the use of TCP instead of UDP for queries by setting options usevc 2018-08-16 13:18:40 +00:00
riscv Fix setjmp for RISC-V: 2018-07-23 09:54:28 +00:00
rpc Fix CONFS to append the value in this case. 2018-09-18 01:38:44 +00:00
secure Carefully update stack guard bytes inside __guard_setup(). 2018-04-24 15:59:39 +00:00
softfloat Add implementations for clog(3), clogf(3), and clog(3). 2018-05-13 09:54:34 +00:00
sparc64 Remove MD __sys_* private symbols. 2018-12-05 00:46:09 +00:00
stdio Follow up on r331936. gets_s(3) will also fail in the same way that 2018-10-23 14:16:02 +00:00
stdlib Provide set_constraint_handler_s(3) man page. 2018-08-19 14:39:57 +00:00
stdtime strptime: make %k and %l specifiers match their description in 2018-11-03 23:37:13 +00:00
string Avoid OOB reads in memmem(3). 2018-10-15 20:20:57 +00:00
sys Remove special case handling for getfhat(fd, NULL, handle). 2018-12-11 02:48:49 +00:00
tests regcomp: reduce size of bitmap for multibyte locales 2018-12-12 04:23:00 +00:00
uuid libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
x86/sys Fix a regression in r321608. 2017-08-13 14:42:23 +00:00
xdr General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
yp libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
libc_nossp.ldscript
libc.ldscript
Makefile disable BIND_NOW in libc, libthr, and rtld 2018-12-03 15:59:46 +00:00
Makefile.depend
Versions.def Create namespace for the symbols added during 13-CURRENT cycle. 2018-11-12 19:12:14 +00:00