History log of /freebsd-10-stable/usr.bin/patch/common.h
Revision Date Author Comments
# 306914 09-Oct-2016 pfg

MFC r306560, r306561:
patch(1): make some macros look boolean.

Minor cleanup inspired by a new patch(1) variant in schily tools.

For reference:
https://sourceforge.net/p/schillix-on/


# 285976 28-Jul-2015 delphij

Fix patch(1) shell injection vulnerability. [SA-15:14]

Fix resource exhaustion in TCP reassembly. [SA-15:15]

Fix OpenSSH multiple vulnerabilities. [SA-15:16]


# 275841 16-Dec-2014 pfg

MFC r275553, r275612;

patch(1): Bring fixes from OpenBSD

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

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


# 265160 30-Apr-2014 pfg

MFC r264581, r264744:

Various style(9) fixes and typos in printf, grep, sort and patch.

#define should be followed by a tab.


# 285976 28-Jul-2015 delphij

Fix patch(1) shell injection vulnerability. [SA-15:14]

Fix resource exhaustion in TCP reassembly. [SA-15:15]

Fix OpenSSH multiple vulnerabilities. [SA-15:16]


# 275841 16-Dec-2014 pfg

MFC r275553, r275612;

patch(1): Bring fixes from OpenBSD

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

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


# 265160 30-Apr-2014 pfg

MFC r264581, r264744:

Various style(9) fixes and typos in printf, grep, sort and patch.

#define should be followed by a tab.