-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fuzzing on date: date -I @
triggers a panic
#4494
Comments
date -I @
triggers a panic
I ran the same on GNU
@sylvestre What should the correct response be in this case? |
at least
would be great |
So do I just update the String in panic! or is there a something more you'd like me to add? |
I think you need to handle the error properly |
@sylvestre I noticed the panic is placed inside the After the change, the output is as follows: Failed case: $ target/debug/date -I@
thread 'main' panicked at 'date:` invalid argument `@` for '--iso-8601'', src/uu/date/src/date.rs:118:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Success case: target/debug/date -Ihours
2023-03-12T11+05:30 |
Note that the comment on this panic says that this case should have been handled by clap, but it wasn't. So probably we need to add a value parser to the argument in clap. |
Found with the fuzzer introduced in #4389
The text was updated successfully, but these errors were encountered: