+
Skip to content

Conversation

jfinkels
Copy link
Collaborator

Fix a subtraction underflow that occurred on head --bytes=-N when the input had fewer than N bytes. Before this commit,

printf "a" | head -c -2

would panic. After this commit, it terminates successfully with no output as expected.

Fix a subtraction underflow that occurred on `head --bytes=-N` when the
input had fewer than `N` bytes. Before this commit,

    printf "a" | head -c -2

would panic. After this commit, it terminates successfully with no
output as expected.
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre merged commit d81d893 into uutils:main Dec 31, 2024
63 checks passed
@jfinkels jfinkels deleted the head-too-many-negative-bytes branch January 2, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载