#
621f4553 |
| 29-Nov-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
tail: Fix heap overflow in -F case.
The number of events we track can vary over time, but we only allocate enough space for the exact number of events we are tracking when we first begin, resulting
tail: Fix heap overflow in -F case.
The number of events we track can vary over time, but we only allocate enough space for the exact number of events we are tracking when we first begin, resulting in a trivially reproducable heap overflow. Fix this by allocating enough space for the greatest possible number of events (two per file) and clean up the code a bit.
Also add a test case which triggers the aforementioned heap overflow, although we don't currently have a way to detect it.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude, markj Differential Revision: https://reviews.freebsd.org/D42839
show more ...
|
Revision tags: release/14.0.0 |
|
#
d0b2dbfa |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0 |
|
#
fa3af3ce |
| 16-Mar-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
tail: Verify correct behavior when input does not end in a newline.
Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D39116
|
Revision tags: release/12.4.0 |
|
#
643ac419 |
| 13-Jul-2022 |
Xin LI <delphij@FreeBSD.org> |
Improve usability of head(1) and tail(1):
- Consistently support -q (quiet) and -v (verbose) - Allow specifying numbers with SI prefixes supported by expand_number(3) - Remove 2^31 limit on lines
Improve usability of head(1) and tail(1):
- Consistently support -q (quiet) and -v (verbose) - Allow specifying numbers with SI prefixes supported by expand_number(3) - Remove 2^31 limit on lines for head(1)
MFC after: 2 weeks Reviewed by: lwhsu, pauamma, gbe Relnotes: yes Differential Revision: https://reviews.freebsd.org/D35720
show more ...
|
Revision tags: release/13.1.0, release/12.3.0 |
|
#
58b1a126 |
| 05-Jul-2021 |
Mark Johnston <markj@FreeBSD.org> |
tail: Add regression tests for -f and -F
MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31055
|
Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0 |
|
#
2aaf9152 |
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|
#
809a8352 |
| 11-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
Drop "All rights reserved" from the files I own
Also, add SPDX tags where needed.
MFC after: 2 weeks
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
d23662ec |
| 19-Feb-2018 |
Alan Somers <asomers@FreeBSD.org> |
tail: fix "tail -r" for piped input that begins with '\n'
A subtle logic bug, probably introduced in r311895, caused tail to print the first two lines of piped input in forward order, if the very fi
tail: fix "tail -r" for piped input that begins with '\n'
A subtle logic bug, probably introduced in r311895, caused tail to print the first two lines of piped input in forward order, if the very first character was a newline.
PR: 222671 Reported by: Jim Long <freebsd-bugzilla@umpquanet.com>, pprocacci@gmail.com MFC after: 3 weeks Sponsored by: Spectra Logic Corp
show more ...
|
Revision tags: release/10.4.0 |
|
#
8fcbcc2d |
| 16-Sep-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r323635
|
#
b754c279 |
| 13-Sep-2017 |
Navdeep Parhar <np@FreeBSD.org> |
MFH @ r323558.
|
#
71607cbe |
| 09-Sep-2017 |
Enji Cooper <ngie@FreeBSD.org> |
Unbreak :broken_pipe
- Capture exit code in pipeline and test in output. - Drop awk use in favor of `sleep 2`. This helps guarantee the EPIPE behavior without the potential race.
|
#
7c69f31e |
| 09-Sep-2017 |
Enji Cooper <ngie@FreeBSD.org> |
Check result of seq call and save output via atf_check -o
This ensures that seq outputting to ints will not fail as silently if there's an error.
|
#
5be4ad9e |
| 09-Sep-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r323343
|
#
b2b1603e |
| 02-Sep-2017 |
Conrad Meyer <cem@FreeBSD.org> |
tail(1): Do not print bogus errno string
In the case where write(2) does not return -1, it does not initialize errno. This can happen when a broken pipe causes a short write.
I attempted to adapt t
tail(1): Do not print bogus errno string
In the case where write(2) does not return -1, it does not initialize errno. This can happen when a broken pipe causes a short write.
I attempted to adapt the submitted test case to ATF but could not figure out how to make the test run in the ATF environment. So the aborted test is left disabled, in case someone would like to run it manually or fix it.
PR: 221976 Submitted by: <martin AT lispworks.com> (earlier version) Sponsored by: Dell EMC Isilon
show more ...
|
Revision tags: release/11.1.0 |
|
#
8a6fe8ce |
| 11-Jan-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r311812 through r311939.
|
#
cdb7a6fc |
| 10-Jan-2017 |
Alan Somers <asomers@FreeBSD.org> |
Fix memory leaks during "tail -r" of an irregular file
* Rewrite r_buf to use standard tail queues instead of a hand-rolled circular linked list. Free dynamic allocations when done. * Remove an op
Fix memory leaks during "tail -r" of an irregular file
* Rewrite r_buf to use standard tail queues instead of a hand-rolled circular linked list. Free dynamic allocations when done. * Remove an optimization for the case where the file is a multiple of 128KB in size and there is a scarcity of memory. * Add ATF tests for "tail -r" and its variants.
Reported by: Valgrind Reviewed by: ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9067
show more ...
|