`p->locals` may be `NULL` when error occurs before the point.
This is reported by oss-fuzz:
Issue 19886: mruby:mruby_fuzzer: Potential-null-reference in setup_numparams
MODIFY
mrbgems/mruby-compiler/core/parse.y
mrbgems/mruby-compiler/core/parse.y
@@ -845,7 +845,8 @@ setup_numparams(parser_state *p, node *a)
if (a && (a->car || (a->cdr && a->cdr->car) || (a->cdr->cdr && a->cdr->cdr->car) || (a->cdr->cdr->cdr->cdr && a->cdr->cdr->cdr->cdr->car))) {
yyerror(p, "ordinary parameter is defined");
}
- else {
+ else if (p->locals) {
+ /* p->locals should not be NULL unless error happens before the point */
node* args = 0;
for (i = nvars; i > 0; i--) {
char buf[3];

`p->locals` may be `NULL` when error occurs before the point.

This is reported by oss-fuzz:
Issue 19886: mruby:mruby_fuzzer: Potential-null-reference in setup_numparams