Shell: Fix bad cast to BarewordLiteral
As found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28109&q=label%3AProj-serenity
This commit is contained in:
parent
c1c5225b72
commit
9d9347cd5a
Notes:
sideshowbarker
2024-07-19 01:04:40 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/9d9347cd5ae Pull-request: https://github.com/SerenityOS/serenity/pull/4314
1 changed files with 1 additions and 1 deletions
|
@ -1380,7 +1380,7 @@ RefPtr<AST::Node> Parser::parse_glob()
|
|||
auto glob_after = parse_glob();
|
||||
if (glob_after) {
|
||||
if (glob_after->is_glob()) {
|
||||
auto glob = static_cast<AST::BarewordLiteral*>(glob_after.ptr());
|
||||
auto glob = static_cast<AST::Glob*>(glob_after.ptr());
|
||||
textbuilder.append(glob->text());
|
||||
} else if (glob_after->is_bareword()) {
|
||||
auto bareword = static_cast<AST::BarewordLiteral*>(glob_after.ptr());
|
||||
|
|
Loading…
Add table
Reference in a new issue