find: avoid panic on -printf width above u16::MAX#746
Open
SAY-5 wants to merge 2 commits into
Open
Conversation
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #746 +/- ##
=======================================
Coverage 91.87% 91.88%
=======================================
Files 35 35
Lines 7152 7159 +7
Branches 376 376
=======================================
+ Hits 6571 6578 +7
Misses 437 437
Partials 144 144 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Commit 0eb072b has test result changes: bfs testsuite: |
Signed-off-by: say <say.apm35@gmail.com>
|
Commit 584786c has test result changes: bfs testsuite: |
|
that issue already fixed, @SAY-5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
find -printf "%111111c"(or any directive with a width above 65535) panics withFormatting argument out of range, as reported in #693. The width is passed straight into{content:>width$}, but the formatting machinery caps a runtime width atu16::MAXand panics for anything larger.This pads the field by hand with
str::repeatinstead, so the output matches the requested width for any value and large widths no longer crash. Added a regression test that exercises a width of 100000.Closes #693