Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove unused pathnames.h header since patch was refactoring into not invoking | 2018-04-07 | 1 | -2/+1 | |
| | | | | ed back in 2015; ok millert@ tb@ tobias@ | ||||
* | Fix adding and removing files with git-style a/ b/ diffs: only skip | 2017-12-20 | 1 | -3/+5 | |
| | | | | | | | six letters if they actually match "--- a/" and "+++ b/" instead of laxer checks. ok tom, tedu, millert | ||||
* | Unbreak previous for git diffs that do not have the a/ prefix. | 2017-05-30 | 1 | -2/+2 | |
| | | | | Found the hard way be me, OK tedu | ||||
* | sometimes patches coming from other places have extra a/ and b/ directories | 2017-05-26 | 1 | -7/+15 | |
| | | | | | prepended to filenames. detect this condition and attempt to correct it. ok openbsd | ||||
* | One string buffer can use recallocarray() to ensure that the address space | 2017-03-26 | 1 | -2/+2 | |
| | | | | | doesn't get dribbled with known contents. ok otto millert tobias | ||||
* | If reading fails, do not go into infinite loop asking for a filename | 2016-09-02 | 1 | -3/+5 | |
| | | | | | Happens in bulf build where no tty is available. ok sthen@ naddy@ $(jot -b yes 1000) landry@ | ||||
* | Add native support for ed-style diffs. No need to pledge "proc exec" anymore. | 2015-10-16 | 1 | -85/+7 | |
| | | | | ok deraadt | ||||
* | Account for newlines in substitution (s///) commands. Substitution | 2015-07-31 | 1 | -2/+14 | |
| | | | | | | | | 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@ | ||||
* | Remove support for automatically checking files out of RCS. The | 2015-07-26 | 1 | -27/+11 | |
| | | | | | behavior is confusing to users and even GNU patch no longer does it by default. OK krw@ guenther@ | ||||
* | Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@ | 2015-02-05 | 1 | -1/+2 | |
| | |||||
* | Handle ed command "s" as a one line command, which it is. | 2014-12-14 | 1 | -3/+3 | |
| | | | | | | Prevents arbitrary ed command executions in following lines. ok millert | ||||
* | The function savestr allows NULL return values during Plan A patching so in | 2014-12-13 | 1 | -7/+7 | |
| | | | | | | 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). | ||||
* | spaces | 2014-12-08 | 1 | -2/+2 | |
| | |||||
* | three trivial reallocarray() uses | 2014-12-01 | 1 | -4/+4 | |
| | |||||
* | Properly validate line ranges supplied in diff file to prevent overflows. | 2014-11-26 | 1 | -4/+27 | |
| | | | | | | | Also fixes an out of boundary memory access because the resulting values are used as array indices. ok millert | ||||
* | Introduce strtolinenum to properly check line numbers while parsing: | 2014-11-25 | 1 | -32/+48 | |
| | | | | | | no signs, no spaces, just digits, 0 <= x <= LONG_MAX ok millert, otto | ||||
* | Remove SCCS support. For this to work, we would need "get", which we don't | 2014-11-22 | 1 | -2/+2 | |
| | | | | | | even have in ports. XSI functionality of POSIX, therefore optional. ok deraadt, schwarze, tedu | ||||
* | Avoid iterating over end of string. | 2014-11-18 | 1 | -3/+3 | |
| | | | | ok millert, otto | ||||
* | Check fstat return value. Also, use off_t for file size and offsets as | 2014-11-17 | 1 | -37/+39 | |
| | | | | | | suggested by bluhm@. ok schwarze@ | ||||
* | unsigned char casts for ctype | 2013-11-26 | 1 | -25/+28 | |
| | | | | ok krw | ||||
* | Bring file selection in accordance with the man page; from Stefan Esser | 2013-07-11 | 1 | -35/+33 | |
| | | | | ok millert@ | ||||
* | Silence gcc warnings. | 2012-04-11 | 1 | -1/+3 | |
| | | | | ok deraadt@ | ||||
* | rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and | 2009-10-27 | 1 | -5/+1 | |
| | | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms | ||||
* | use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg | 2007-09-02 | 1 | -5/+5 | |
| | |||||
* | type police and assorted cleanup. From Lionel Fourquaux; ok ray@ | 2006-03-11 | 1 | -4/+3 | |
| | |||||
* | spacing | 2004-08-05 | 1 | -3/+3 | |
| | |||||
* | Properly detect if a patch already has been applied, even if there | 2004-07-09 | 1 | -2/+8 | |
| | | | | | | are no eols at eofs involved. Tested by quite some people. ok deraadt@ | ||||
* | Fix a segv when patch cannot find a file and the user indicates | 2004-01-28 | 1 | -3/+3 | |
| | | | | | | to use the file anyway. Problem found by david@ ok david@ millert@ | ||||
* | o fairly major man page reorganization | 2003-10-31 | 1 | -63/+183 | |
| | | | | | | o add --posix option for strict POSIX conformance o change filename determination to match GNU patch Tested by various people, including a full ports build by naddy@ | ||||
* | realloc(3) cleanup. | 2003-09-28 | 1 | -7/+27 | |
| | | | | ok cloder@ tedu@ | ||||
* | Add license from patch.c to original source files missing a license. | 2003-08-15 | 1 | -2/+28 | |
| | | | | ok deraadt@ | ||||
* | spacing | 2003-08-05 | 1 | -8/+8 | |
| | |||||
* | - use stdbool.h instead of roll-your-own booleans | 2003-08-01 | 1 | -91/+97 | |
| | | | | | | | | | - fix some -Wall warnings - fix asserts: in some cases remove them, in other cases they have become Internal errors or detection of malformed patch files. - fix some free() related code ok millert@ tedu@ | ||||
* | o add pathnames.h | 2003-07-29 | 1 | -6/+5 | |
| | | | | | | o ignore empty TMPDIR environment variable o strip any trailing slashes from TMPDIR otto@ OK | ||||
* | minor knf and cleanups; otto ok | 2003-07-28 | 1 | -13/+11 | |
| | |||||
* | More cleanup: sprinkled some const, removed ugly EXTERN/INTERN.h, | 2003-07-28 | 1 | -26/+29 | |
| | | | | | | some rewriting of code to make it more readable and more KNF. ok millert@ tedu@ deraadt@ | ||||
* | Add POSIX -b option but don't change the default beahvior wrt backups | 2003-07-25 | 1 | -4/+6 | |
| | | | | yet. The old -b option is now -z (matches GNU patch). | ||||
* | just about nothing | 2003-07-22 | 1 | -4/+4 | |
| | |||||
* | POSIX defines allowed commands as {a,c,d,i,s} but patch was only | 2003-07-22 | 1 | -6/+5 | |
| | | | | | recognizing {a,c,d}. We need to recognize 's' (substitute) for the "dot alone on a line" bug fix in diff(1). | ||||
* | More cleanup. | 2003-07-22 | 1 | -103/+107 | |
| | | | | ok millert@ tedu@ | ||||
* | fix header | 2003-07-21 | 1 | -2/+2 | |
| | |||||
* | remove a bit more junk | 2003-07-21 | 1 | -8/+8 | |
| | |||||
* | knf | 2003-07-21 | 1 | -8/+14 | |
| | |||||
* | knf and other cleanup; ok otto | 2003-07-21 | 1 | -1152/+1165 | |
| | |||||
* | remove junk; ok otto tedu | 2003-07-18 | 1 | -95/+95 | |
| | |||||
* | Fix merge error. | 2003-07-17 | 1 | -4/+4 | |
| | | | | ok millert@ tedu@ | ||||
* | Teach patch how to deal with \ No newline at end of file. | 2003-07-16 | 1 | -2/+63 | |
| | | | | | From NetBSD. ok deraadt@ | ||||
* | strcpy trashing, help from tedu; ok tedu | 2003-04-08 | 1 | -3/+3 | |
| | |||||
* | string fixes; ok miod henning | 2003-04-05 | 1 | -9/+11 | |
| | |||||
* | make patch -f and -b actually skip patches for which the file can't be | 2000-12-14 | 1 | -2/+3 | |
| | | | | found, instead of claiming it will and erroring out anyway. |