Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/uu/cksum/src/cksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ fn maybe_sanitize_length(
// will have its extra bits set to zero.
(Some(AlgoKind::Shake128 | AlgoKind::Shake256), Some(len)) => match len.parse::<usize>() {
Ok(0) => Ok(None),
Ok(l) => Ok(Some(HashLength::from_bits(l))),
Ok(l) => {
if l > u32::MAX as usize {
Err(ChecksumError::InvalidLength(len.into()).into())
} else {
Ok(Some(HashLength::from_bits(l)))
}
}
Err(_) => Err(ChecksumError::InvalidLength(len.into()).into()),
},

Expand Down
3 changes: 3 additions & 0 deletions src/uu/false/locales/en-US.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ false-about = Returns false, an unsuccessful exit status.

false-help-text = Print help information
false-version-text = Print version information

false-usage =
false [ignored command-line arguments]...
1 change: 1 addition & 0 deletions src/uu/false/src/false.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub fn uu_app() -> Command {
.version(crate_version!())
.help_template(uucore::localized_help_template("false"))
.about(translate!("false-about"))
.override_usage(translate!("false-usage"))
// We provide our own help and version options, to ensure maximum compatibility with GNU.
.disable_help_flag(true)
.disable_version_flag(true)
Expand Down
3 changes: 3 additions & 0 deletions src/uu/true/locales/en-US.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ true-about = Returns true, a successful exit status.

true-help-text = Print help information
true-version-text = Print version information

true-usage =
true [ignored command-line arguments]...
1 change: 1 addition & 0 deletions src/uu/true/src/true.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub fn uu_app() -> Command {
.version(crate_version!())
.help_template(uucore::localized_help_template("true"))
.about(translate!("true-about"))
.override_usage(translate!("true-usage"))
// We provide our own help and version options, to ensure maximum compatibility with GNU.
.disable_help_flag(true)
.disable_version_flag(true)
Expand Down
Loading