[Bug 270867] xargs -E is not working properly
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 270867] xargs -E is not working properly"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 14 Jun 2023 13:27:30 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270867
--- Comment #6 from commit-hook@FreeBSD.org ---
A commit in branch stable/13 references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=bc47005a648b1b326cfd852c039a9b01854c5796
commit bc47005a648b1b326cfd852c039a9b01854c5796
Author: Tom Jones <thj@FreeBSD.org>
AuthorDate: 2022-07-05 15:03:51 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2023-06-14 12:48:55 +0000
xargs: terminate if line replacement cannot be constructed
If the line with replacement cannot be constructed xargs should
terminate as documented in the man page
We encounter this error, but gnu/xargs doesn't because they have a much
larger limit for created outputs (~10000 lines).
Reviewed by: oshogbo
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35574
(cherry picked from commit f058359ba5e08c555d7e6f192217f890b83cd46c)
xargs: fix description of strnsubst return value
Reported by: oshogbo
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35574
(cherry picked from commit 1e692b938e37a9b43a43ace2739eb6b97379cac0)
xargs: improve foundeof check for -E
4aeb63826e0f got it almost correct (we can't use strcmp() here as
current argument isn't guaranteed to be NUL-terminated), but we also
need to check that current argument length is equal to that of eofstr.
PR: 270867
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D39583
(cherry picked from commit 21ef48af5c0f4ed85a5f42855b5a8d58b5431103)
xargs: Fix typo in error message.
MFC after: 1 week
Sponsored by: Klara, Inc.
(cherry picked from commit 6d777389e19d3bebde515e88e8405de45d8af7bd)
xargs: Consistently use strtonum() to parse arguments.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D40425
(cherry picked from commit fbc445addf9183d180bb8b488281617bb19d9242)
usr.bin/xargs/strnsubst.c | 15 ++++++++++-----
usr.bin/xargs/xargs.c | 44 +++++++++++++++++++++++++-------------------
2 files changed, 35 insertions(+), 24 deletions(-)
--
You are receiving this mail because:
You are the assignee for the bug.