History log of /freebsd/usr.bin/patch/pch.c (Results 51 – 75 of 88)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# d7e0694a 08-Dec-2014 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r275478 through r275622.


# d3fc0cb8 08-Dec-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

patch(1): avoid line number overflows

Introduce strtolinenum to properly check line numbers while parsing:
no signs, no spaces, just digits, 0 <= x <= LONG_MAX

Properly validate line ranges supplie

patch(1): avoid line number overflows

Introduce strtolinenum to properly check line numbers while parsing:
no signs, no spaces, just digits, 0 <= x <= LONG_MAX

Properly validate line ranges supplied in diff file to prevent overflows.
Also fixes an out of boundary memory access because the resulting values
are used as array indices.

PR: 195436
Obtained from: OpenBSD (CVS pch.c rev 1.45, 1,46, common.h rev 1.28)
MFC after: 1 week

show more ...


# 2c3f939c 08-Dec-2014 Enji Cooper <ngie@FreeBSD.org>

MFhead @ r275589


# 2b468eba 07-Dec-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

Small space changes

Mostly to keep in sync with OpenBSD and update the TAG.

Obtained from: OpenBSD
MFC after: 5 days


# e91a64de 06-Dec-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

Merge fixes from OpenBSD.

Check fstat return value. Also, use off_t for file size and offsets.
Avoid iterating over end of string.

Obtained from: OpenBSD (CVS rev. 1.41, 1.43)
MFC after: 1 week


# dbfbf4a8 06-Dec-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

Update OpenBSD CVS revision for our r255232.

This is a no-op to make it easier to track changes from OpenBSD

MFC after: 3 days


Revision tags: release/10.1.0
# 246e7a2b 02-Sep-2014 Neel Natu <neel@FreeBSD.org>

IFC @r269962

Submitted by: Anish Gupta (akgupt3@gmail.com)


# ee7b0571 19-Aug-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Merge head from 7/28


# 1b833d53 13-Aug-2014 Alexander V. Chernikov <melifaro@FreeBSD.org>

Sync to HEAD@r269943.


Revision tags: release/9.3.0
# c1a08643 15-Jun-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

patch: unsign the line length to avoid overflows.

Patch(1) uses a short int for the line length, which is usually
sufficient for regular diffs, but makes no effort to signal
when there is an overflo

patch: unsign the line length to avoid overflows.

Patch(1) uses a short int for the line length, which is usually
sufficient for regular diffs, but makes no effort to signal
when there is an overflow.

Change the line length to an unsigned short int to better use
the fact that a length is never negative. The change is loosely
inspired on a related change in DragonFly, but we avoid spending
more memory than necessary.

While here adjust the messages to be clearer on what is happening.

MFC after: 1 week

show more ...


# c44f94d0 14-Jun-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

patch: cleanup some unnecessary cruft.

- Drop some bogus casts to size_t.
- The new_p_foo variables are not needed after r267426.

Pointed out by: bde
MFC after: 1 week


# 9f00ccd3 12-Jun-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

Avoid zeroing during allocation.

This change reverts a change from OpenBSD which made use of
calloc, and therefore wasted time initializing arrays that
will later be realloc'ed. Consistently use Fre

Avoid zeroing during allocation.

This change reverts a change from OpenBSD which made use of
calloc, and therefore wasted time initializing arrays that
will later be realloc'ed. Consistently use FreeBSD's
reallocf().

While here also merge the changes from OpenBSD's manpage
patch.1 Rev 1.27:
"patch was moved from user portability (UP) to base in issue 7
and is no longer optional"

MFC after: 1 week

show more ...


Revision tags: release/10.0.0
# 0bfd163f 18-Oct-2013 Gleb Smirnoff <glebius@FreeBSD.org>

Merge head r233826 through r256722.


# 1ccca3b5 10-Oct-2013 Alan Somers <asomers@FreeBSD.org>

IFC @256277

Approved by: ken (mentor)


Revision tags: release/9.2.0
# ef90af83 20-Sep-2013 Peter Grehan <grehan@FreeBSD.org>

IFC @ r255692

Comment out IA32_MISC_ENABLE MSR access - this doesn't exist on AMD.
Need to sort out how arch-specific MSRs will be handled.


# 47823319 11-Sep-2013 Peter Grehan <grehan@FreeBSD.org>

IFC @ r255459


# 0fbf163e 06-Sep-2013 Mark Murray <markm@FreeBSD.org>

MFC


# d1d01586 05-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge from head


# 79d8aaa9 05-Sep-2013 Stefan Eßer <se@FreeBSD.org>

Fix file selection logic for the RCS/SCCS case, as was done for the simple
file case before. Bump version because of the changed behavior, which now
matches the documentation.

Reviewed by: pfg


# 40f65a4d 07-Aug-2013 Peter Grehan <grehan@FreeBSD.org>

IFC @ r254014


# 552311f4 17-Jul-2013 Xin LI <delphij@FreeBSD.org>

IFC @253398


# ceae90c2 05-Jul-2013 Peter Grehan <grehan@FreeBSD.org>

IFC @ r252763


# 6d85e39b 04-Jul-2013 David E. O'Brien <obrien@FreeBSD.org>

Merge r252513 from src/gnu/usr.bin/patch into src/usr.bin/patch:

Properly handle input lines containing NUL characters such that pgets()
accurately fills the read buffer.

Callers of pgets() still m

Merge r252513 from src/gnu/usr.bin/patch into src/usr.bin/patch:

Properly handle input lines containing NUL characters such that pgets()
accurately fills the read buffer.

Callers of pgets() still mis-process the buffer contents if the read line
contains NUL characters, but this at least makes pgets() accurate.

show more ...


# 0571fd57 04-Jul-2013 David E. O'Brien <obrien@FreeBSD.org>

Merge r252512 from src/gnu/usr.bin/patch into src/usr.bin/patch:

Make it so that 'patch < FUBAR' and 'patch -i FUBAR' operate the same.

The former makes a copy of stdin, but was not accurately putt

Merge r252512 from src/gnu/usr.bin/patch into src/usr.bin/patch:

Make it so that 'patch < FUBAR' and 'patch -i FUBAR' operate the same.

The former makes a copy of stdin, but was not accurately putting the
content of stdin into a temp file. This lead to the undercounting
the number of lines in hunks containing NUL characters when reading
from stdin. Thus resulting in "unexpected end of file in patch" errors.

show more ...


# cfe30d02 19-Jun-2013 Gleb Smirnoff <glebius@FreeBSD.org>

Merge fresh head.


1234