mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
Shell: Replace one more user-controlled assert with a syntax error
test-case: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28114&q=label%3AProj-serenity
This commit is contained in:
parent
9d9347cd5a
commit
62bd1adb06
Notes:
sideshowbarker
2024-07-19 01:04:36 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/62bd1adb067 Pull-request: https://github.com/SerenityOS/serenity/pull/4314
1 changed files with 1 additions and 2 deletions
|
@ -883,8 +883,7 @@ RefPtr<AST::Node> Parser::parse_redirection()
|
|||
dest_pipe_fd = -1;
|
||||
} else {
|
||||
auto fd = number.to_int();
|
||||
ASSERT(fd.has_value());
|
||||
dest_pipe_fd = fd.value();
|
||||
dest_pipe_fd = fd.value_or(-1);
|
||||
}
|
||||
auto redir = create<AST::Fd2FdRedirection>(pipe_fd, dest_pipe_fd); // Redirection Fd2Fd
|
||||
if (dest_pipe_fd == -1)
|
||||
|
|
Loading…
Add table
Reference in a new issue