Age | Commit message (Collapse) | Author |
|
may modify the string buffer. From Joerg Sonnenberger for DragonFly BSD.
ok millert@
|
|
Also:
- sort declarations in the same order as definitions in pch.c
- delete an extra pfetch() declaration
ok tobias@
|
|
|
|
|
|
Spotted by jsg@ when working on mesa. Diff tested by sthen@ in
a partial i386 bulk. Input from and ok jsg@ millert@
|
|
libc (stdio etc), instead do the unlink tasks then call _exit() instead
ok millert
|
|
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
|
|
ok deraadt@
|
|
FreeBSD and NetBSD has this for a while, and GNU patch got it even earlier
than we got -C.
input from sthen@ & jca@; okay sthen@, jca@ and deraadt@.
|
|
Delete a bunch of unnecessary #includes and sort to match style(9)
while doing the above cleanup.
ok deraadt@ krw@
|
|
okay tb@ and benno@
|
|
ed back in 2015; ok millert@ tb@ tobias@
|
|
six letters if they actually match "--- a/" and "+++ b/" instead of
laxer checks.
ok tom, tedu, millert
|
|
ok millert
|
|
Found the hard way be me, OK tedu
|
|
prepended to filenames. detect this condition and attempt to correct it.
ok openbsd
|
|
doesn't get dribbled with known contents.
ok otto millert tobias
|
|
with the global by the same name, so rename it "lines_allocatedp".
|
|
If the last line of a file is removed, the line cache is erroneously
considered empty, which means that changed lines are added at the top.
spotted by and okay otto@
|
|
Happens in bulf build where no tty is available.
ok sthen@ naddy@ $(jot -b yes 1000) landry@
|
|
ok krw
|
|
misbehaviour is triggered with 'c' and 'i' commands on empty buffers.
Spotted and fixed by Martin Natano <natano at natano dot net>.
ok millert@
|
|
ok tb@
|
|
OK tb@ jsg@
|
|
as a test idiom, either when pledge was young or during the transition
to strings.... dunno
|
|
|
|
ok deraadt
|
|
|
|
(adding proc exec), now that "exec" has arrived in the kernel. This
permits the dangerous game of feeding ed-style diffs with popen() via
/bin/ed. Shocked yet? Your mission, should you choose to accept it,
is to replace this code with an builtin ed-style patcher, maybe cribbing
code from ed itself.
I'm sorry, but we can't fix the entire world all at once. Noone loves
deprecating standarized features as much as we do, but there are some
lines. Maybe if people become aware of how crappy the implimentations
of some standard features are, they could help decide the path.
|
|
fork+execve, and execve is not going to become available in this fashion.
ed diffs should be handled using a built-in handler, and various folks
have been discussing this behind the scenes.
|
|
/bin/ed. This is RETARDED. Nothing learned from the last year?
Add tame "proc" until that is fixed, to allow fork+exec.
I beg for someone to cross-link the guts of ed directly into patch, or
write a ed-subset which can do the job.
|
|
in case of exploitation, no more network access, fork, execve, etc.
I wonder if we could use whitepath lists here - if it is reasonable to
limit operation in directories known early on?
|
|
commands might contain a newline in the replacement pattern (escaped
with a backslash before it), causing patch's understanding of the
state the ed child process is in to diverge from reality. This can
lead to patch unwillingly feeding '!' (execute shell command) lines
to ed. From Martin Natano. OK deraadt@
|
|
behavior is confusing to users and even GNU patch no longer does
it by default. OK krw@ guenther@
|
|
"and" and "or" to join sentence clauses, and you can use commas, but both hinders
reading;
|
|
|
|
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
|
|
Prevents arbitrary ed command executions in following lines.
ok millert
|
|
case of out of memory conditions, Plan B can step in. In many cases, NULL
value is not properly handled, so use xstrdup here (it's outside Plan A/B
patching, which means that even Plan B relies on successful operations).
|
|
by supporting arbitrarily long lines just like Plan A does.
ok tedu
|
|
|
|
|
|
|
|
Also fixes an out of boundary memory access because the resulting values
are used as array indices.
ok millert
|
|
no signs, no spaces, just digits, 0 <= x <= LONG_MAX
ok millert, otto
|
|
a specific version.
ok millert
|
|
even have in ports. XSI functionality of POSIX, therefore optional.
ok deraadt, schwarze, tedu
|
|
interesting it has no impact on the maintainance of this stuff.
ok tobias
|
|
ok millert, otto
|