diff options
author | Haldun Bayhantopcu <haldun@github.com> | 2023-10-31 10:14:34 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-10-31 11:14:07 +0000 |
commit | 322755a0076e74e5959c9f6b2682be79a60cef4e (patch) | |
tree | 18c18508d59bfc06bda95b8b71409e9ac1f0fafc | |
parent | d8a9245513184c1dcde94ea09d95560eab577f7e (diff) | |
download | ruby-322755a0076e74e5959c9f6b2682be79a60cef4e.tar.gz |
[ruby/prism] Fix a possible null dereference
https://github.com/ruby/prism/commit/7dbb8c7e3e
-rw-r--r-- | prism/prism.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/prism/prism.c b/prism/prism.c index 1809587eb0..9ab674de48 100644 --- a/prism/prism.c +++ b/prism/prism.c @@ -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) |