libc/regex: fix two buffer underruns.Fix some rather complex regex issues found on OpenBSD as part of someongoing work to fix a sed(1) bug.Curiously the OpenBSD tests don't trigger segfaults on
libc/regex: fix two buffer underruns.Fix some rather complex regex issues found on OpenBSD as part of someongoing work to fix a sed(1) bug.Curiously the OpenBSD tests don't trigger segfaults on FreeBSD but thebugs were confirmed by running a port of FreeBSD's regex under OpenBSD'smalloc. Huge thanks to Ingo for confirming the behavior.Taken from: Ingo Schwarze (through openbsd-tech 2016-05-15)MFC after: 1 week
show more ...
libc: spelling fixes.Mostly on comments.
regex: prevent two improbable signed integer overflows.In matcher() we used an integer to index nsub of type size_t.In print() we used an integer to index nstates of type sopno,typedef'd long.In
regex: prevent two improbable signed integer overflows.In matcher() we used an integer to index nsub of type size_t.In print() we used an integer to index nstates of type sopno,typedef'd long.In both cases the indexes never take negative values.Match the types to avoid any error.MFC after: 5 days
Add -static to CFLAGS to unbreak the tests by using a libc.a withthe xlocale private symbols exposed which aren't exposed publiclyvia the DSOPR: 191354MFC after: 1 weekSponsored by: EMC / Isilo
Add -static to CFLAGS to unbreak the tests by using a libc.a withthe xlocale private symbols exposed which aren't exposed publiclyvia the DSOPR: 191354MFC after: 1 weekSponsored by: EMC / Isilon Storage Division
Fix -Wformat issues and minor whitespace issues in surrounding areasMFC after: 1 weekSponsored by: EMC / Isilon Storage Division
split.ih:- Create automatically generated include header for split.cmain.c:- Use function definitions from debug.ih and split.ih instead of externsSponsored by: EMC / Isilon Storage Division
Use `==` instead of `=` in the function comment above split(..) so mkh -pexposes split(..).MFC after: 1 weekSponsored by: EMC / Isilon Storage Division
Use ANSI C function prototypes/definitions instead of K&R style onesMFC after: 1 weekSponsored by: EMC / Isilon Storage Division
Add missing headers and sort #includes per style(9)MFC after: 1 weekSponsored by: EMC / Isilon Storage Division
- Use ANSI C function prototypes/definitions instead of K&R style ones- Add a missing return type for main(..)MFC after: 1 weekSponsored by: EMC / Isilon Storage Division
Fix -Wformat warnings by using the correct format qualifiersMFC after: 1 weekSponsored by: EMC / Isilon Storage Division
mdoc: rendering fixes
computematchjumps(): fix allocator sizeof operand mismatch.Mostly cosmetical warning.Found by: Clang static analyzer
Prevent NULL pointer de-reference.As a follow up to r279090, if dp hasn't been defined, weshouldn't attempt to do an optimization here.
regex(3): Fix uninitialized pointer values.CID: 405582 (also clang static checker)CID: 1018724
Disallow pattern spaces which would cause intermediate calculations tooverflow size_t.Obtained from: DragonFly (2841837793bd095a82f477e9c370cfe6cfb3862c dillon)Security: CERT VU#695940MFC after:
Disallow pattern spaces which would cause intermediate calculations tooverflow size_t.Obtained from: DragonFly (2841837793bd095a82f477e9c370cfe6cfb3862c dillon)Security: CERT VU#695940MFC after: 3 days
mdoc: remove EOL whitespace.
Plug a memory leak.Obtained from: DragonFlyBSD (commit 5119ece)MFC after: 2 weeks
regex(3): Add support for \< and \> word delimitersSolaris and other OSs have support for \< and \> as worddelimiters in utilities like sed(1). These are useful tohave for general compatiblity wi
regex(3): Add support for \< and \> word delimitersSolaris and other OSs have support for \< and \> as worddelimiters in utilities like sed(1). These are useful tohave for general compatiblity with Solaris but should beavoided for portability with other systems, including thetraditional BSDs.Bump __FreeBSD_version as this is likely to affect someuserland utilities.Reference:https://www.illumos.org/issues/516PR: bin/153257Obtained from: IllumosMFC after: 1 month
Revert r267675:The code doesn't really benefit of using reallocf() in this case.Also, the realloc() results being assigned temporary variable whichmakes blind replacement with reallocf() mostly u
Revert r267675:The code doesn't really benefit of using reallocf() in this case.Also, the realloc() results being assigned temporary variable whichmakes blind replacement with reallocf() mostly useless.Pointed out by: stefanf, bde
regex: Make use of reallocf().Use of reallocf is useful in libraries as we are not certain theapplication will exit after NULL.This somewhat reduces portability but if since you are buildingthi
regex: Make use of reallocf().Use of reallocf is useful in libraries as we are not certain theapplication will exit after NULL.This somewhat reduces portability but if since you are buildingthis as part of libc it is likely you have our non-standardreallocf(3) already.Reviewed by: acheMFC after: 5 days
Revert r265367:Use of calloc instead of malloc in regex (from OpenBSD).In this case the change makes no sense since we are using realloc() later.Reported by: ache
regex: Use calloc instead of malloc.Mostly to reduce differences with OpenBSD.Obtained from: OpenBSD (CVS rev. 1.17)MFC after: 3 days
regex: Remove some unreachable breaks.This is based on a much bigger cleanup done in Illumos.Reference:https://www.illumos.org/issues/2077MFC after: 1 week
Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}if not already defined. This allows building libc from outside oflib/libc using a reach-over makefile.A typical use-case is to
Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}if not already defined. This allows building libc from outside oflib/libc using a reach-over makefile.A typical use-case is to build a standard ILP32 version and a COMPAT32version in a single iteration by building the COMPAT32 version using areach-over makefile.Obtained from: Juniper Networks, Inc.
12345678