<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/diff, branch release/13.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F13.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F13.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2024-08-01T16:46:19Z</updated>
<entry>
<title>diff: Fix integer overflow.</title>
<updated>2024-08-01T16:46:19Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2024-07-29T14:02:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c14665b4aee7e1594467bac4a9d9cc5c66173975'/>
<id>urn:sha1:c14665b4aee7e1594467bac4a9d9cc5c66173975</id>
<content type='text'>
The legacy Stone algorithm uses `int` to represent line numbers, array
indices, and array lengths.  If given inputs approaching `INT_MAX` lines,
it would overflow and attempt to allocate ridiculously large amounts of
memory.  To avoid this without penalizing non-pathological inputs,
switch a few variables to `size_t` and add checks while and immediately
after reading both inputs.

MFC after:	3 days
PR:		280371
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D46169

(cherry picked from commit 9317242469f1ca682626d9806f8caf65d143c09a)
</content>
</entry>
<entry>
<title>diff: Fix usage message and documentation.</title>
<updated>2024-08-01T16:43:02Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2024-07-29T14:02:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ae8b85ac11257f1166dfe25c354bf0d4bd64b98d'/>
<id>urn:sha1:ae8b85ac11257f1166dfe25c354bf0d4bd64b98d</id>
<content type='text'>
The `--ignore-all-space` option was incorrectly documented as
`--ignore-all-blanks` in some (but not all) places.

MFC after:	3 days
PR:		280434
Sponsored by:	Klara, Inc.
Reviewed by:	0mp, markj
Differential Revision:	https://reviews.freebsd.org/D46160

(cherry picked from commit ab830de9f58c1b257e42b4fbdd46b3ca6a837ee6)
</content>
</entry>
<entry>
<title>diff: honour -B flag with -q</title>
<updated>2024-06-07T21:15:57Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2024-05-16T14:53:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=12ea2d04c37982cabf7865e8897226c81aae4ab0'/>
<id>urn:sha1:12ea2d04c37982cabf7865e8897226c81aae4ab0</id>
<content type='text'>
PR:		278988
Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45220

(cherry picked from commit fb623aab3927a6825ff7731198ec2e33426f7607)
(cherry picked from commit 1b7672ed992963e1c79ccc152f4afd72c91481f3)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line nroff pattern</title>
<updated>2023-08-23T17:43:32Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:32:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=24115b70d6d614ed7ac5cfc4f51fa9d6cfe8b1b2'/>
<id>urn:sha1:24115b70d6d614ed7ac5cfc4f51fa9d6cfe8b1b2</id>
<content type='text'>
Remove /^\.\\"\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b2c76c41be32)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-23T17:43:30Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:32:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=023fc80ee38a117fa65b2ccb2abf8bdc7dbd6fd9'/>
<id>urn:sha1:023fc80ee38a117fa65b2ccb2abf8bdc7dbd6fd9</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d0b2dbfa0ecf)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-23T17:43:26Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3d497e17ebd33fe0f58d773e35ab994d750258d6'/>
<id>urn:sha1:3d497e17ebd33fe0f58d773e35ab994d750258d6</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 1d386b48a555)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line .h pattern</title>
<updated>2023-08-23T17:43:22Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=34041aac835a0bce462bccb7e0239c0ba092f872'/>
<id>urn:sha1:34041aac835a0bce462bccb7e0239c0ba092f872</id>
<content type='text'>
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit 42b388439bd3)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-23T17:43:21Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=17da660ad5b3b9cd90e164dd4dbb9beaa7203054'/>
<id>urn:sha1:17da660ad5b3b9cd90e164dd4dbb9beaa7203054</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b3e7694832e8)
</content>
</entry>
<entry>
<title>diff: Don't (ab)use sprintf() as a kind of strcat().</title>
<updated>2023-01-24T05:12:44Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2022-11-16T03:17:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a8b6a13b0aa3408a7793dad22ad0193a2c32477f'/>
<id>urn:sha1:a8b6a13b0aa3408a7793dad22ad0193a2c32477f</id>
<content type='text'>
Previously print_header() used sprintf() of a buffer to itself as a
kind of string builder but without checking for overflows.  This
raised -Wformat-truncation and -Wrestrict warnings in GCC.  Instead,
just conditionally print the new timestamp fields after the initial
strftime()-formatted string.  While here, use sizeof(buf) with
strftime() rather than a magic number.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D36814

(cherry picked from commit 6100374ccf2644d3fd233bde8b8f4e73d9953c30)
</content>
</entry>
<entry>
<title>diff: Don't treat null characters like carriage returns in readhash().</title>
<updated>2023-01-24T05:12:00Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2022-11-16T03:16:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=95a52eb29ca93fb457ac618b8de7a754700e55c4'/>
<id>urn:sha1:95a52eb29ca93fb457ac618b8de7a754700e55c4</id>
<content type='text'>
The implicit fall-through in the !D_FORCEASCII case caused null
characters to be treated as carriage returns honoring the D_STRIPCR,
D_FOLDBLANKS, and D_IGNOREBLANKS flags.

Reported by:	GCC -Wimplicit-fallthrough
Reviewed by:	bapt
Fixes:	 	3cbf98e2bee9 diff: read whole files to determine if they are ASCII text
Differential Revision:	https://reviews.freebsd.org/D36813

(cherry picked from commit 4e0771714d6192119dcf7553b921bf88866d8925)
</content>
</entry>
</feed>
