Skip to content

Commit 4e5c8c1

Browse files
Stranger6667matzbot
authored andcommitted
[ruby/prism] fix: sigsegv on malformed shebang
Signed-off-by: Dmitry Dygalo <[email protected]> ruby/prism@e23292120e
1 parent 00357ee commit 4e5c8c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prism/prism.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22676,7 +22676,7 @@ pm_parser_init(pm_parser_t *parser, const uint8_t *source, size_t size, const pm
2267622676
}
2267722677

2267822678
search_shebang = false;
22679-
} else if (options->main_script && !parser->parsing_eval) {
22679+
} else if (options != NULL && options->main_script && !parser->parsing_eval) {
2268022680
search_shebang = true;
2268122681
}
2268222682
}

0 commit comments

Comments
 (0)