#
b6faad1a |
| 28-Dec-2020 |
millert <millert@openbsd.org> |
Fix an off-by-one error in the marking of the O_CH operator following an OOR2 operator. Also includes a regress test for the issue. From FreeBSD via miod@
|
#
d1a1db7f |
| 11-Jul-2018 |
martijn <martijn@openbsd.org> |
Drop a const-bomb on regexec. It's probably not a good idea to remove a const promise when processing it in the regex engine.
Minor tweak and OK schwarze@
|
#
3240e6a8 |
| 21-Sep-2016 |
guenther <guenther@openbsd.org> |
Delete casts to off_t and size_t that are implied by assignments or prototypes. Ditto for some of the char* and void* casts too.
verified no change to instructions on ILP32 (i386) and LP64 (amd64)
Delete casts to off_t and size_t that are implied by assignments or prototypes. Ditto for some of the char* and void* casts too.
verified no change to instructions on ILP32 (i386) and LP64 (amd64) ok natano@ abluhm@ deraadt@ millert@
show more ...
|
#
e315dedf |
| 26-May-2016 |
martijn <martijn@openbsd.org> |
Change the way regexec handles REG_STARTEND combined with REG_NOTBOL. The new code sees this combination as a continuation of string at offset pmatch[0].rm_so, instead of a new string which starts at
Change the way regexec handles REG_STARTEND combined with REG_NOTBOL. The new code sees this combination as a continuation of string at offset pmatch[0].rm_so, instead of a new string which starts at that offset. This change fixes a search quirk in vi and is needed for upcoming fixes in ed/sed/vi.
This new behaviour is also used in gnu regex.
Lots of help from schwarze@ Manpage bits by schwarze@ OK schwarze@ and millert@
show more ...
|
#
af486f33 |
| 25-May-2016 |
schwarze <schwarze@openbsd.org> |
KNF with respect to indentation; no code change
|
#
1ca78303 |
| 25-May-2016 |
schwarze <schwarze@openbsd.org> |
Fix another one-byte buffer underflow (read access only). This change touches code that only runs when REG_BASIC is given and the regular expression is anchored with [[:<:]] or \< _and_ uses backrefe
Fix another one-byte buffer underflow (read access only). This change touches code that only runs when REG_BASIC is given and the regular expression is anchored with [[:<:]] or \< _and_ uses backreferences.
Simplify the logic while here, already looking at the previous character if REG_STARTEND and REG_NOTBOL are both in use, in anticipation of martijn@'s upcoming patch which will further improve REG_STARTEND.
OK millert@ martijn@ Also tested by Pedro Giffuni (pfg) on FreeBSD.
show more ...
|
#
3465aa04 |
| 17-May-2016 |
schwarze <schwarze@openbsd.org> |
Fix a one-byte buffer underflow (read access only). This change touches code that only runs when REG_BASIC is given and the regular expression is anchored with ^ _and_ uses backreferences. The segfau
Fix a one-byte buffer underflow (read access only). This change touches code that only runs when REG_BASIC is given and the regular expression is anchored with ^ _and_ uses backreferences. The segfault could only be triggered when the ^ anchor was inside a leading () subexpression quantified with *.
OK martijn@ Patch also proofread by Pedro Giffuni <pfg at FreeBSD dot org>.
show more ...
|
#
101bb365 |
| 28-Dec-2015 |
mmcc <mmcc@openbsd.org> |
Remove NULL-checks before free() and needless argument casts.
ok tb@
|
#
373c8319 |
| 09-Oct-2014 |
deraadt <deraadt@openbsd.org> |
use reallocarray(NULL, a, b) instead of malloc(a, b), which gives us proper mult int overflow detection. The existing code already handles malloc failure properly, of course.
|
#
0595d4db |
| 28-Nov-2013 |
guenther <guenther@openbsd.org> |
The print() routine here can be passed at least some of the non-characters OUT to EOW, making its domain CHAR_MIN...CODEMAX. It makes sense to have pchar() take the same domain and output those non-
The print() routine here can be passed at least some of the non-characters OUT to EOW, making its domain CHAR_MIN...CODEMAX. It makes sense to have pchar() take the same domain and output those non-characters appropriately, so the (unsigned char) cast for isprint() goes in pchar(). Constipate pchar() while we're here, and let print() pass through NUL to it, as it knows how to output it unambiguously.
ok otto@ millert@
show more ...
|
#
2be36617 |
| 17-Apr-2013 |
tedu <tedu@openbsd.org> |
silence some warnings by adding prototypes, casts, and headers as appropriate. in regex, stop using the struct hack for a fixed size array
|
#
53b37aa9 |
| 05-Aug-2005 |
espie <espie@openbsd.org> |
zap rcsid
|
#
efc4ecac |
| 03-Jan-2005 |
otto <otto@openbsd.org> |
Plug a mem leak. Now you can run hanoi.sed witt a lot of pegs and not run out of mem! From FreeBSD PR 75656.
ok millert@ deraadt@
|
#
a1a76537 |
| 30-Nov-2004 |
otto <otto@openbsd.org> |
remove useless comments, once used for header file generation and delete parameter names from prototypes. ok millert@
|
#
991d2fff |
| 29-Nov-2004 |
otto <otto@openbsd.org> |
Better fix for the "unbounded recursion case", for example \(b*\)\(a*\1\)*, more cases in regress/lib/libc/regexp/test. Only stop evaluation of a back reference if the match lenght is zero and the re
Better fix for the "unbounded recursion case", for example \(b*\)\(a*\1\)*, more cases in regress/lib/libc/regexp/test. Only stop evaluation of a back reference if the match lenght is zero and the recursion level is too deep. With help from jaredy@ Problem case found by Andrew Brown in NetBSD PR 28126. ok deraadt@ millert@
show more ...
|
#
3d7c72a1 |
| 17-Oct-2004 |
otto <otto@openbsd.org> |
ansify and deregister; no change in obj code. ok millert@
|
#
cb95f7c6 |
| 13-Aug-2004 |
millert <millert@openbsd.org> |
Change an assert into a loop termination condition. Fixes a core dump found by jmc@. OK otto@
|
#
2617cd22 |
| 02-Apr-2004 |
otto <otto@openbsd.org> |
Avoid unbounded recursion in some expressions involving back references. For example: echo "foo foo bar bar bar baz" | sed 's/\([^ ]*\)\( *\1\)*/\1/g' Test case found by dhartmei@ ok millert@ dhartme
Avoid unbounded recursion in some expressions involving back references. For example: echo "foo foo bar bar bar baz" | sed 's/\([^ ]*\)\( *\1\)*/\1/g' Test case found by dhartmei@ ok millert@ dhartmei@ tedu@
show more ...
|
#
5b9192c4 |
| 30-Mar-2004 |
millert <millert@openbsd.org> |
Allow compilation w/ -DREDEBUG; non-debug compilation is unaffected. From NetBSD.
|
#
6580fee3 |
| 02-Jun-2003 |
millert <millert@openbsd.org> |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
#
c364cbbd |
| 25-May-2002 |
deraadt <deraadt@openbsd.org> |
remaining easy snprintf conversions
|
#
c72b5b24 |
| 16-Feb-2002 |
millert <millert@openbsd.org> |
Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be don
Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
show more ...
|
#
442a6afd |
| 28-Apr-1997 |
millert <millert@openbsd.org> |
- cast usages of *printf() to void since we don't check return val - move an assert to be *before* a strcpy() where it can do some good. - integrate NetBSD fixes for 64-bit machines (NetBSD PR #3450,
- cast usages of *printf() to void since we don't check return val - move an assert to be *before* a strcpy() where it can do some good. - integrate NetBSD fixes for 64-bit machines (NetBSD PR #3450, Ross Harvey) - add lite2 tags
show more ...
|
#
b37692f8 |
| 12-Apr-1997 |
millert <millert@openbsd.org> |
long -> int to fix 64bit issues. This breaks 16bit machines but since we don't have any 16bit ports...) The alternative is to use int32_t's but then this code will break when/if int > 32bits which i
long -> int to fix 64bit issues. This breaks 16bit machines but since we don't have any 16bit ports...) The alternative is to use int32_t's but then this code will break when/if int > 32bits which is not so unlikely. Fixes NetBSD PR #3450 from Ross Harvey (but in a different way)
show more ...
|
#
e9b2b68c |
| 19-Aug-1996 |
tholo <tholo@openbsd.org> |
Fix RCS ids Make sure everything uses {SYS,}LIBC_SCCS properly
|