From 8835ca23c138b2fa5e883acd6b368fdc25d7ce23 Mon Sep 17 00:00:00 2001 From: Haldun Bayhantopcu Date: Sat, 16 Sep 2023 14:58:06 +0200 Subject: [ruby/yarp] Fix a possible null pointer deference https://github.com/ruby/yarp/commit/41f601b81b --- yarp/yarp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/yarp/yarp.c b/yarp/yarp.c index b250220e7e..6dc7141370 100644 --- a/yarp/yarp.c +++ b/yarp/yarp.c @@ -8467,6 +8467,7 @@ parse_target(yp_parser_t *parser, yp_node_t *target) { // 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) -- cgit v1.2.3