History log of /netbsd/usr.bin/patch/inp.c (Results 1 – 25 of 30)
Revision Date Author Comments
# 0f6dca37 16-Jun-2023 wiz <wiz@NetBSD.org>

Fix memory leak

CVS: ----------------------------------------------------------------------
CVS: CVSROOT cvs.NetBSD.org:/cvsroot
CVS: please use "PR category/123" to have the commitmsg appended to

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"?

show more ...


# 0307da70 16-Jun-2023 wiz <wiz@NetBSD.org>

Remove trailing whitespace.


# 8d3845b5 26-May-2021 cjep <cjep@NetBSD.org>

correct indentation. spotted by Roland.


# 5631a155 25-May-2021 cjep <cjep@NetBSD.org>

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 c

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.

show more ...


# dc14de11 18-Jun-2018 christos <christos@NetBSD.org>

Keep things portable (requested by joerg) by not depending on reallocarr
and instead doing the overflow check ourselves.


# 2b359480 16-Jun-2018 christos <christos@NetBSD.org>

PR/53368: Thomas Barabosch: Potential integer overflow in usr.bin/patch/inp.c


# 00cedc97 24-Jul-2015 christos <christos@NetBSD.org>

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.

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.

show more ...


# 6e3add81 21-Oct-2009 joerg <joerg@NetBSD.org>

Do not try to mmap a zero length file.


# 57b5269d 05-Jun-2009 joerg <joerg@NetBSD.org>

Explicitly include fcntl.h for O_CREAT to not depend on namespace
pollution.


# d96ab870 18-Apr-2009 lukem <lukem@NetBSD.org>

Attempt to fix previous to address a coredump.


# 1e4c32c4 13-Apr-2009 lukem <lukem@NetBSD.org>

Fix sign-compare issue


# d5b2c9a8 19-Sep-2008 joerg <joerg@NetBSD.org>

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 l

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.

show more ...


# f5a52110 09-Apr-2006 christos <christos@NetBSD.org>

It is silly to creat() and close a file just to stat it. open/fstat/close
instead checking for errors. From Coverity CID 1276.


# 75c32b46 30-Jul-2003 itojun <itojun@NetBSD.org>

use bounded string op


# c0970755 12-Jul-2003 itojun <itojun@NetBSD.org>

pedantic check around unsafe strncpy.
XXX this code needs a serious rewrite


# ef4b3d62 12-Jul-2003 itojun <itojun@NetBSD.org>

copyright missing in files, copy them from README


# 3e51d2b7 08-Jul-2003 kristerw <kristerw@NetBSD.org>

Const poisoning.


# 7e5434fe 30-May-2003 kristerw <kristerw@NetBSD.org>

Remove stuff that are not needed any longer.


# b86c323d 30-May-2003 kristerw <kristerw@NetBSD.org>

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 cas

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...)

show more ...


# 2a9882e7 29-May-2003 kristerw <kristerw@NetBSD.org>

Be consistent with use of types (e.g. do not use LINENUM for quantities
that are not line numbers).


# 93318b47 16-Mar-2002 kristerw <kristerw@NetBSD.org>

Check result of malloc and strdup
Made some functions static
Removed unneccessary buffer
Increased size of some buffers that could overflow


# 2b96113f 11-Mar-2002 kristerw <kristerw@NetBSD.org>

KNF


# 175b5054 11-Mar-2002 kristerw <kristerw@NetBSD.org>

Ansify
Remove unused defines
Remove #ifndef lint
Remove redundant and incorrect casts.


# 8bcbaa7b 08-Mar-2002 kristerw <kristerw@NetBSD.org>

Ansify
Remove 'register'
Make local functions static.
Remove most '#ifndef lint'


# 141aa9e5 09-Feb-1999 sommerfe <sommerfe@NetBSD.org>

Fix PR2429: catch doubly-applied patches which create new files.


12