| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libc: regexec(3) adjustment.
Change the behavior of when REG_STARTEND is combined with REG_NOTBOL.
From the original posting[1]:
"Enable the assumption that pmatch[0].rm_so is a continuation offset
to a string and allows us to do a proper assessment of the character
in regards to it's word position ('^' or '\<'), without risking going
into unallocated memory."
This change makes us similar to how glibc handles REG_STARTEND |
REG_NOTBOL, and is closely related to a soon-to-land fix to sed.
Special thanks to Martijn van Duren and Ingo Schwarze for working
out some consistent behaviour.
Differential Revision: https://reviews.freebsd.org/D6257
Taken from: openbsd-tech 2016-05-24 [1] (Martijn van Duren)
Notes:
svn path=/stable/9/; revision=302169
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libc/regex: fix two buffer underruns.
Fix some rather complex regex issues found on OpenBSD as part of some
ongoing work to fix a sed(1) bug.
Curiously the OpenBSD tests don't trigger segfaults on FreeBSD but the
bugs were confirmed by running a port of FreeBSD's regex under OpenBSD's
malloc. Huge thanks to Ingo for confirming the behavior.
Obtained from: OpenBSD (CVS 1.20, 1.21)
Notes:
svn path=/stable/9/; revision=300964
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/stable/9/; revision=298727
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r292153:
Add -static to CFLAGS to unbreak the tests by using a libc.a with
the xlocale private symbols exposed which aren't exposed publicly
via the DSO
PR: 191354
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/stable/9/; revision=292482
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r291837:
split.ih:
- Create automatically generated include header for split.c
main.c:
- Use function definitions from debug.ih and split.ih instead of externs
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/stable/9/; revision=292171
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r291832,r291833,r291834,r291835,r291836,r291838:
r291832:
Fix -Wformat warnings by using the correct format qualifiers
Sponsored by: EMC / Isilon Storage Division
r291833:
- Use ANSI C function prototypes/definitions instead of K&R style ones
- Add a missing return type for main(..)
Sponsored by: EMC / Isilon Storage Division
r291834:
Add missing headers and sort #includes per style(9)
Sponsored by: EMC / Isilon Storage Division
r291835:
Use ANSI C function prototypes/definitions instead of K&R style ones
Sponsored by: EMC / Isilon Storage Division
r291836:
Use `==` instead of `=` in the function comment above split(..) so mkh -p
exposes split(..).
Sponsored by: EMC / Isilon Storage Division
r291838:
Fix -Wformat issues and minor whitespace issues in surrounding areas
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/stable/9/; revision=292145
|
| |
|
|
|
|
|
|
|
|
|
| |
Disallow pattern spaces which would cause intermediate calculations to
overflow size_t.
Obtained from: DragonFly (2841837793bd095a82f477e9c370cfe6cfb3862c dillon)
Security: CERT VU#695940
Notes:
svn path=/stable/9/; revision=278911
|
| |
|
|
|
|
|
|
|
| |
Plug a memory leak.
Obtained from: DragonFlyBSD (commit 5119ece)
Notes:
svn path=/stable/9/; revision=276554
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Remove some unreachable breaks in regex.
This is based on a much bigger cleanup done in Illumos.
Reference:
https://www.illumos.org/issues/2077
Notes:
svn path=/stable/9/; revision=265727
|
| |
|
|
|
|
|
|
|
|
| |
Fix assignment of maximum bounadary.
Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly rev fd39c81ba220f7ad6e4dc9b30d45e828cf58a1ad
Notes:
svn path=/stable/9/; revision=249289
|
| |
|
|
|
|
|
|
|
|
| |
Merged revisions: 227487,227753,227807,227818,227999,228002,228875,230156,231673,232498,232601,232620,232626,232926-232927,232929,232931,232935,233173,233600,234573,234578,235239
This currently defines __NO_TLS on ARM (unlike head), because the required
support function has not been MFC'd.
Notes:
svn path=/stable/9/; revision=235785
|
| |
|
|
|
|
|
| |
They have no effect when coming in pairs, or before .Bl/.Bd
Notes:
svn path=/head/; revision=213573
|
| |
|
|
|
|
|
|
|
|
| |
following an OOR2 operator.
PR: 130504
MFC after: 2 weeks
Notes:
svn path=/head/; revision=197246
|
| |
|
|
| |
Notes:
svn path=/head/; revision=197245
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
An additional one coming from http://www.research.att.com/~gsf/testregex/
was not added; at some point the entire AT&T regression test harness
should be imported here.
But that would also mean commitment to fix the uncovered errors.
PR: 130504
Submitted by: Chris Kuklewicz
Notes:
svn path=/head/; revision=197234
|
| |
|
|
|
|
|
|
|
|
|
| |
that belong in a character class, and (2) one for matching all
the characters *not* in a character class.
Submitted by: Mark B, mkbucc at gmail.com
MFC after: 3 days
Notes:
svn path=/head/; revision=182795
|
| |
|
|
| |
Notes:
svn path=/head/; revision=176380
|
| |
|
|
|
|
|
| |
prototypes. No function changes.
Notes:
svn path=/head/; revision=170528
|
| |
|
|
|
|
|
|
| |
This is the final change that makes libc to compile with
WERROR on my amd64 crashbox.
Notes:
svn path=/head/; revision=169982
|
| |
|
|
| |
Notes:
svn path=/head/; revision=169092
|
| |
|
|
|
|
|
| |
Obtained from: OpenBSD
Notes:
svn path=/head/; revision=167223
|
| |
|
|
|
|
|
|
|
| |
zero and the recursion level is too deep.
Obtained from: OpenBSD
Notes:
svn path=/head/; revision=167222
|
| |
|
|
|
|
|
|
|
| |
echo "foo foo bar bar bar baz" | sed 's/\([^ ]*\)\( *\1\)*/\1/g'
Obtained from: OpenBSD via NetBSD (rev. 1.18)
Notes:
svn path=/head/; revision=167216
|
| |
|
|
|
|
|
|
|
| |
clause.
# If I've done so improperly on a file, please let me know.
Notes:
svn path=/head/; revision=165903
|
| |
|
|
| |
Notes:
svn path=/head/; revision=156613
|
| |
|
|
|
|
|
| |
Reviewed by: davidxu
Notes:
svn path=/head/; revision=156608
|
| |
|
|
| |
Notes:
svn path=/head/; revision=150053
|
| |
|
|
|
|
|
|
| |
we must allow the character beginning at "p" to be converted to a wide
character for the purposes of EOL processing and word-boundary matching.
Notes:
svn path=/head/; revision=149180
|
| |
|
|
|
|
|
| |
properly in multibyte locales.
Notes:
svn path=/head/; revision=149179
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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:
svn path=/head/; revision=149009
|
| |
|
|
|
|
|
|
|
|
| |
Confirmed by: tjr [1]
[1] PERFORCE CHANGESET 57044:
http://perforce.freebsd.org/changeView.cgi?CH=57044
Notes:
svn path=/head/; revision=145493
|
| |
|
|
| |
Notes:
svn path=/head/; revision=141846
|
| |
|
|
| |
Notes:
svn path=/head/; revision=140505
|
| |
|
|
|
|
|
|
| |
PR: bin/75656
MFC after: 2 weeks
Notes:
svn path=/head/; revision=139437
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
reading past 'stop' in various places when converting multibyte characters.
Reading too far caused truncation to not be detected when it should have
been, eventually causing regexec() to loop infinitely in with certain
combinations of patterns and strings in multibyte locales.
PR: 74020
MFC after: 4 weeks
Notes:
svn path=/head/; revision=137959
|
| |
|
|
|
|
|
| |
include it in all cases.
Notes:
svn path=/head/; revision=136091
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
multibyte character support:
- In CHadd(), avoid writing past the end of the character set bitmap when
the opposite-case counterpart of wide characters with values less than
NC have values greater than or equal to NC.
- In CHaddtype(), fix a braino that caused alphabetic characters to be
added to all character classes! (but only with REG_ICASE)
PR: 71367
Notes:
svn path=/head/; revision=134802
|
| |
|
|
| |
Notes:
svn path=/head/; revision=132390
|
| |
|
|
|
|
|
| |
with "sh mkh" so it works if the script is not executable.
Notes:
svn path=/head/; revision=132389
|
| |
|
|
|
|
|
| |
of OANYOF sets for the moment.
Notes:
svn path=/head/; revision=132388
|
| |
|
|
| |
Notes:
svn path=/head/; revision=132387
|
| |
|
|
|
|
|
| |
support now.
Notes:
svn path=/head/; revision=132031
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
idea is that we perform multibyte->wide character conversion while parsing
and compiling, then convert byte sequences to wide characters when they're
needed for comparison and stepping through the string during execution.
As with tr(1), the main complication is to efficiently represent sets of
characters in bracket expressions. The old bitmap representation is replaced
by a bitmap for the first 256 characters combined with a vector of individual
wide characters, a vector of character ranges (for [A-Z] etc.), and a vector
of character classes (for [[:alpha:]] etc.).
One other point of interest is that although the Boyer-Moore algorithm had
to be disabled in the general multibyte case, it is still enabled for UTF-8
because of its self-synchronizing nature. This greatly speeds up matching
by reducing the number of multibyte conversions that need to be done.
Notes:
svn path=/head/; revision=132019
|
| |
|
|
|
|
|
| |
contains an illegal multibyte character sequence.
Notes:
svn path=/head/; revision=132017
|
| |
|
|
|
|
|
| |
unused character category calculations.
Notes:
svn path=/head/; revision=131973
|
| |
|
|
| |
Notes:
svn path=/head/; revision=131692
|
| |
|
|
| |
Notes:
svn path=/head/; revision=131504
|
| |
|
|
| |
Notes:
svn path=/head/; revision=119893
|
| |
|
|
|
|
|
|
|
|
| |
Only warnings that could be fixed without changing the generated object
code and without restructuring the source code have been handled.
Reviewed by: /sbin/md5
Notes:
svn path=/head/; revision=111010
|
| |
|
|
| |
Notes:
svn path=/head/; revision=108087
|