1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00
freebsd/bin/ed
Pedro F. Giffuni 6e8ef9cbb0 ed(1): Prevent possible string overflows
Use strlcpy instead of strncpy to guarantee NULL termination.

Pointed out by:	imp
CID:		1007252
X-MFC with:	r292454
2015-12-18 23:05:36 +00:00
..
test
buf.c
cbc.c Always check the limits of array index variables before using them. 2014-08-21 02:40:33 +00:00
ed.1 mdoc: escape Re 2015-04-26 10:03:05 +00:00
ed.h
glbl.c ed(1): Fix [-Werror=logical-not-parentheses] 2015-04-20 02:07:57 +00:00
io.c
main.c ed(1): Prevent possible string overflows 2015-12-18 23:05:36 +00:00
Makefile Convert bin/ to LIBADD, reduce overlinking allow to build all components as 2014-11-25 11:15:40 +00:00
Makefile.depend Add META_MODE support. 2015-06-13 19:20:56 +00:00
POSIX
re.c
README
sub.c
undo.c

$FreeBSD$

ed is an 8-bit-clean, POSIX-compliant line editor.  It should work with
any regular expression package that conforms to the POSIX interface
standard, such as GNU regex(3).

If reliable signals are supported (e.g., POSIX sigaction(2)), it should
compile with little trouble.  Otherwise, the macros SPL1() and SPL0()
should be redefined to disable interrupts.

The following compiler directives are recognized:
DES		- to add encryption support (requires crypt(3))
NO_REALLOC_NULL	- if realloc(3) does not accept a NULL pointer
BACKWARDS	- for backwards compatibility
NEED_INSQUE	- if insque(3) is missing

The file `POSIX' describes extensions to and deviations from the POSIX
standard.

The ./test directory contains regression tests for ed. The README
file in that directory explains how to run these.

For a description of the ed algorithm, see Kernighan and Plauger's book
"Software Tools in Pascal," Addison-Wesley, 1981.