mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 00:05:06 +00: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
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
Add a link
Reference in a new issue