mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fixed dereference to null pointer in 'codegen.c' reported by 'clang-analyzer'
This commit is contained in:
+4
-2
@@ -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);
|
||||
}
|
||||
|
||||
pv = &s->irep->pool[s->irep->plen];
|
||||
i = s->irep->plen++;
|
||||
if (&s->irep->pool[s->irep->plen] != NULL) {
|
||||
pv = &s->irep->pool[s->irep->plen];
|
||||
i = s->irep->plen++;
|
||||
}
|
||||
|
||||
switch (mrb_type(val)) {
|
||||
case MRB_TT_STRING:
|
||||
|
||||
Reference in New Issue
Block a user