Home | History | Annotate | Download | only in patch
History log of /src/usr.bin/patch/inp.c
RevisionDateAuthorComments
 1.30  16-Jun-2023  wiz Fix memory leak

CVS: ----------------------------------------------------------------------
CVS: CVSROOT cvs.NetBSD.org:/cvsroot
CVS: please use "PR category/123" to have the commitmsg appended to PR 123
CVS:
CVS: Please evaluate your changes and consider the following.
CVS: Abort checkin if you answer no.
CVS: => For all changes:
CVS: Do the changed files compile?
CVS: Has the change been tested?
CVS: => If you are not completely familiar with the changed components:
CVS: Has the change been posted for review?
CVS: Have you allowed enough time for feedback?
CVS: => If the change is major:
CVS: => If the change adds files to, or removes files from $DESTDIR:
CVS: => If you are changing a library or kernel interface:
CVS: Have you successfully run "./build.sh release"?
 1.29  16-Jun-2023  wiz Remove trailing whitespace.
 1.28  26-May-2021  cjep correct indentation. spotted by Roland.
 1.27  25-May-2021  cjep As per OpenBSD, use malloc for the line buffer. Fixes the known issue
with long lines and makes our ATF test suite pass fully.
Closes PR bin/54620 from coypu who suggested the approach.
Reviewed by christos.
 1.26  18-Jun-2018  christos branches: 1.26.8;
Keep things portable (requested by joerg) by not depending on reallocarr
and instead doing the overflow check ourselves.
 1.25  16-Jun-2018  christos PR/53368: Thomas Barabosch: Potential integer overflow in usr.bin/patch/inp.c
 1.24  24-Jul-2015  christos branches: 1.24.14;
From Martin Natano @bitrig: Use execve(2) instead of system to apply patches
that require rcs command execution instead system(3) to avoid malicious
filenames in patches causing bad things to happen. In the process, lose SCCS
support. It is not like we are shipping sccs commands for that to work.
 1.23  21-Oct-2009  joerg branches: 1.23.24;
Do not try to mmap a zero length file.
 1.22  05-Jun-2009  joerg Explicitly include fcntl.h for O_CREAT to not depend on namespace
pollution.
 1.21  18-Apr-2009  lukem Attempt to fix previous to address a coredump.
 1.20  13-Apr-2009  lukem Fix sign-compare issue
 1.19  19-Sep-2008  joerg branches: 1.19.6;
Update patch to the version used by DragonFly and derived from OpenBSD.
Major changes are:
- better detection of double applied patches
- rejects remain unified diffs for unified patches
- far less limitations, e.g. patch lines may be arbitrary long

This addresses PR standards/11220 by changing patch -b behavior to be
POSIX compliant. Old behavior can be obtained using --suffix, which
works since NetBSD 1.4. pkgsrc has been adjusted accordingly.
 1.18  09-Apr-2006  christos It is silly to creat() and close a file just to stat it. open/fstat/close
instead checking for errors. From Coverity CID 1276.
 1.17  30-Jul-2003  itojun use bounded string op
 1.16  12-Jul-2003  itojun pedantic check around unsafe strncpy.
XXX this code needs a serious rewrite
 1.15  12-Jul-2003  itojun copyright missing in files, copy them from README
 1.14  08-Jul-2003  kristerw Const poisoning.
 1.13  30-May-2003  kristerw Remove stuff that are not needed any longer.
 1.12  30-May-2003  kristerw Simplify handling of memory allocation, and make sure all return values
from malloc etc. are handled.

This removes the old behavior to retry the operation with a less memory-
consuming method in case malloc failed (this mechanism has never really
worked, and is hard to test. Besides, it is less useful now than it was
20 years ago when the code was written...)
 1.11  29-May-2003  kristerw Be consistent with use of types (e.g. do not use LINENUM for quantities
that are not line numbers).
 1.10  16-Mar-2002  kristerw Check result of malloc and strdup
Made some functions static
Removed unneccessary buffer
Increased size of some buffers that could overflow
 1.9  11-Mar-2002  kristerw KNF
 1.8  11-Mar-2002  kristerw Ansify
Remove unused defines
Remove #ifndef lint
Remove redundant and incorrect casts.
 1.7  08-Mar-2002  kristerw Ansify
Remove 'register'
Make local functions static.
Remove most '#ifndef lint'
 1.6  09-Feb-1999  sommerfe Fix PR2429: catch doubly-applied patches which create new files.
 1.5  06-Nov-1998  christos char -> unsigned char
rindex -> strrchr
 1.4  22-Feb-1998  christos WARNSify
 1.3  19-Sep-1996  thorpej RCS id police.
 1.2  02-Aug-1993  mycroft Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
 1.1  09-Apr-1993  cgd branches: 1.1.1;
patch 2.0.12u8, from prep.ai.mit.edu. this is not under the GPL.
 1.1.1.1  09-Jan-1997  tls Import from 4.4BSD-Lite2
 1.19.6.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.23.24.1  04-Aug-2015  snj Pull up following revision(s) (requested by christos in ticket #918):
usr.bin/patch/patch.1: revisions 1.18, 1.19
usr.bin/patch/common.h: revision 1.21
usr.bin/patch/inp.c: revision 1.24
From Martin Natano @bitrig: Use execve(2) instead of system to apply patches
that require rcs command execution instead system(3) to avoid malicious
filenames in patches causing bad things to happen. In the process, lose SCCS
support. It is not like we are shipping sccs commands for that to work.
--
Use absolute paths for RCS commands (Martin Natano)
--
remove reference to SCCS which is not supported anymore.
--
Fix two typos.
 1.24.14.1  25-Jun-2018  pgoyette Sync with HEAD
 1.26.8.1  31-May-2021  cjep sync with head

RSS XML Feed