Skip to content

Comments

Fix/11044 date large width panic#11053

Open
jorgitin02 wants to merge 4 commits intouutils:mainfrom
jorgitin02:fix/11044-date-large-width-panic
Open

Fix/11044 date large width panic#11053
jorgitin02 wants to merge 4 commits intouutils:mainfrom
jorgitin02:fix/11044-date-large-width-panic

Conversation

@jorgitin02
Copy link

%9223372036854775807c)

macmini server and others added 4 commits February 16, 2026 16:08
Fixes uutils#10279

The --help output for true and false now starts with Usage line
instead of the description, matching GNU coreutils behavior.
- Cap width values at 1024 characters to prevent memory allocation failures
- Add regression test for extreme width values
- Fixes uutils#11044
@sylvestre
Copy link
Contributor

@jorgitin02 #11046 already started
(and you added some unrelated changes in your pr)


/// Maximum allowed width for format modifiers to prevent memory exhaustion
/// This is an arbitrary reasonable limit - GNU date doesn't document a specific limit
const MAX_WIDTH: usize = 1024;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gnu works with umax

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/date/date. tests/date/date is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)

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.

date: date +%9223372036854775807c panic

2 participants