summaryrefslogtreecommitdiff
path: root/usr.bin/patch/pch.c
AgeCommit message (Expand)Author
2023-07-12Don't run off the end of path if it ends in /.Florian Obser
2023-07-12basename(3) can fail, prevent segfault in strlen(3).Florian Obser
2023-07-12Use ssize_t instead of short for line lengthsTheo Buehler
2022-12-26spelling fixes; from paul tagliamonteJason McIntyre
2019-12-02Tweak previous, using fputs here was fineJeremie Courreges-Anglas
2019-12-02Use getline(3) to handle lines longer than 8192 bytes in patch filesJeremie Courreges-Anglas
2018-04-07Remove unused pathnames.h header since patch was refactoring into not invokinganton
2017-12-20Fix adding and removing files with git-style a/ b/ diffs: only skipTheo Buehler
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
2016-09-02If reading fails, do not go into infinite loop asking for a filenameOtto Moerbeek
2015-10-16Add native support for ed-style diffs. No need to pledge "proc exec" anymore.Tobias Stoeckmann
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-02-05Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@Todd C. Miller
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-08spacesTheo de Raadt
2014-12-01three trivial reallocarray() usesTheo de Raadt
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-22Remove SCCS support. For this to work, we would need "get", which we don'tTobias Stoeckmann
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
2013-11-26unsigned char casts for ctypeTheo de Raadt
2013-07-11Bring file selection in accordance with the man page; from Stefan EsserOtto Moerbeek
2012-04-11Silence gcc warnings.Antoine Jacoutot
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2006-03-11type police and assorted cleanup. From Lionel Fourquaux; ok ray@Otto Moerbeek
2004-08-05spacingTheo de Raadt
2004-07-09Properly detect if a patch already has been applied, even if thereOtto Moerbeek
2004-01-28Fix a segv when patch cannot find a file and the user indicatesOtto Moerbeek
2003-10-31o fairly major man page reorganizationTodd C. Miller
2003-09-28realloc(3) cleanup.Otto Moerbeek
2003-08-15Add license from patch.c to original source files missing a license.Otto Moerbeek
2003-08-05spacingTheo de Raadt
2003-08-01- use stdbool.h instead of roll-your-own booleansOtto Moerbeek
2003-07-29o add pathnames.hTodd C. Miller
2003-07-28minor knf and cleanups; otto okTheo de Raadt
2003-07-28More cleanup: sprinkled some const, removed ugly EXTERN/INTERN.h,Otto Moerbeek
2003-07-25Add POSIX -b option but don't change the default beahvior wrt backupsTodd C. Miller
2003-07-22just about nothingTheo de Raadt
2003-07-22POSIX defines allowed commands as {a,c,d,i,s} but patch was onlyTodd C. Miller
2003-07-22More cleanup.Otto Moerbeek
2003-07-21fix headerTheo de Raadt
2003-07-21remove a bit more junkTheo de Raadt
2003-07-21knfTheo de Raadt
2003-07-21knf and other cleanup; ok ottoTheo de Raadt