Commit 29f14e72 authored by Jose Narvaez's avatar Jose Narvaez

Fixed dereference to null pointer in 'codegen.c' reported by 'clang-analyzer'

parent a5cadf4b
...@@ -446,8 +446,10 @@ new_lit(codegen_scope *s, mrb_value val) ...@@ -446,8 +446,10 @@ new_lit(codegen_scope *s, mrb_value val)
s->irep->pool = (mrb_value *)codegen_realloc(s, s->irep->pool, sizeof(mrb_value)*s->pcapa); s->irep->pool = (mrb_value *)codegen_realloc(s, s->irep->pool, sizeof(mrb_value)*s->pcapa);
} }
pv = &s->irep->pool[s->irep->plen]; if (&s->irep->pool[s->irep->plen] != NULL) {
i = s->irep->plen++; pv = &s->irep->pool[s->irep->plen];
i = s->irep->plen++;
}
switch (mrb_type(val)) { switch (mrb_type(val)) {
case MRB_TT_STRING: case MRB_TT_STRING:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment