summaryrefslogtreecommitdiff
path: root/usr.bin/patch
AgeCommit message (Expand)Author
2017-06-12rejname[] is also -r option buffer, and should be PATH_MAXTheo de Raadt
2017-05-30Unbreak previous for git diffs that do not have the a/ prefix.Florian Obser
2017-05-26sometimes patches coming from other places have extra a/ and b/ directoriesTed Unangst
2017-03-26One string buffer can use recallocarray() to ensure that the address spaceTheo de Raadt
2017-03-25parameter "lines_allocated" is a local pointer and should not be confusedTheo de Raadt
2016-09-02Fix 'c'hange command handling if last line of a file is removed.Tobias Stoeckmann
2016-09-02If reading fails, do not go into infinite loop asking for a filenameOtto Moerbeek
2016-07-19Cleanup close(open idioms.Theo de Raadt
2016-02-22Properly handle ed-files which fully replace input file content. ThisTobias Stoeckmann
2016-01-04usage() should exit 2 here, not EXIT_SUCCESSGleydson Soares
2015-12-29fix exit status on pledge(2) failure.Gleydson Soares
2015-11-11exit() after perror() for pledge failure. Perhaps this got introducedTheo de Raadt
2015-11-11creat() -> open equiv; from Frederic NowakTheo de Raadt
2015-10-16Add native support for ed-style diffs. No need to pledge "proc exec" anymore.Tobias Stoeckmann
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-07patch(1) can move to "stdio rpath wpath cpath tmppath fattr proc exec"Theo de Raadt
2015-10-04remove tame "proc". it is not useful, because the "ed" diffs requireTheo de Raadt
2015-10-03As pointed out by tobiasu, ed-style patches still use popen() and executeTheo de Raadt
2015-10-03patch appears to work fully with tame "stdio rpath wpath cpath tmppath fattr".Theo de Raadt
2015-07-31Account for newlines in substitution (s///) commands. SubstitutionTodd C. Miller
2015-07-26Remove support for automatically checking files out of RCS. TheTodd C. Miller
2015-03-13remove the first comma from constructs like ", and," and ", or,": you can useJason McIntyre
2015-02-05Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@Todd C. Miller
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
2014-12-14Handle ed command "s" as a one line command, which it is.Tobias Stoeckmann
2014-12-13The function savestr allows NULL return values during Plan A patching so inTobias Stoeckmann
2014-12-09Fix division by zero for files with long lines (> 1024) in Plan B modeTobias Stoeckmann
2014-12-08spacesTheo de Raadt
2014-12-01three trivial reallocarray() usesTheo de Raadt
2014-11-26Prefer setvbuf() to setlinebuf() for portability; ok deraadt@Todd C. Miller
2014-11-26Properly validate line ranges supplied in diff file to prevent overflows.Tobias Stoeckmann
2014-11-25Introduce strtolinenum to properly check line numbers while parsing:Tobias Stoeckmann
2014-11-25Prevent null pointer dereference on empty input files when diff requiresTobias Stoeckmann
2014-11-22Remove SCCS support. For this to work, we would need "get", which we don'tTobias Stoeckmann
2014-11-21Remove the README. It history from more than 20 years ago, and whileTheo de Raadt
2014-11-18Avoid iterating over end of string.Tobias Stoeckmann
2014-11-17Check fstat return value. Also, use off_t for file size and offsets asTobias Stoeckmann
2014-11-15Call munmap with the same size argument as mmap.Tobias Stoeckmann
2014-10-08userland reallocarray audit.Doug Hogan
2014-05-20Use errc/warnc to simplify code.Philip Guenther
2014-04-15patch was moved from user portability (UP) to base in issue 7Jason McIntyre
2013-11-26unsigned char casts for ctypeTheo de Raadt
2013-11-12pull in local .h files to satisfy protoTheo de Raadt
2013-07-11Bring file selection in accordance with the man page; from Stefan EsserOtto Moerbeek
2012-05-15Fix confusing patch(1) output on failure when using -C. FromTodd C. Miller
2012-04-11Silence gcc warnings.Antoine Jacoutot
2012-04-10Don't try to mmap a zero length file, from NetBSD.Antoine Jacoutot
2010-09-03add an EXIT STATUS section for /usr/bin;Jason McIntyre
2010-07-24Send normal output to stdout instead of everything to stderr. ThisRay Lai
2010-01-08Don't leak memory after strdup() in makedirs().Owain Ainsworth