[ruby/prism] Fix a possible null dereference

https://github.com/ruby/prism/commit/7dbb8c7e3e
This commit is contained in:
Haldun Bayhantopcu 2023-10-31 10:14:34 +01:00 committed by git
parent d8a9245513
commit 322755a007

View File

@ -9738,6 +9738,7 @@ parse_write(pm_parser_t *parser, pm_node_t *target, pm_token_t *operator, pm_nod
// expression.
if (
(call->call_operator_loc.start == NULL) &&
(call->message_loc.start != NULL) &&
(call->message_loc.start[0] == '[') &&
(call->message_loc.end[-1] == ']') &&
(call->block == NULL)