[ruby/prism] Fix a possible malloc(0)
https://github.com/ruby/prism/commit/fa108b8626
This commit is contained in:
parent
b0a2373e14
commit
3801503fe3
@ -15069,7 +15069,7 @@ parse_expression_infix(pm_parser_t *parser, pm_node_t *node, pm_binding_power_t
|
||||
}
|
||||
}
|
||||
|
||||
if (!interpolated) {
|
||||
if (!interpolated && total_length > 0) {
|
||||
void *memory = malloc(total_length);
|
||||
if (!memory) abort();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user