Branch: Tag:

2013-02-16

2013-02-16 16:29:28 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Fixed potential NULL-deref in type checker.

debug_low_index_type() accepts a NULL node argument, but
low_check_indexing() assumed it to be a valid pointer.
It doesn't look like debug_low_index_type() is ever called
with a NULL node argument, but...

Also adds a few fall through markers.

4837:    }    }    } +  /* FALL_THROUGH */ +     default:    add_ref(mixed_type_string);    return mixed_type_string;
5341:    {    int i = -1;    /* Check against the LFUN types. */ -  if(n->token == F_ARROW) +  if(n && (n->token == F_ARROW))    {    (i = FIND_LFUN(p,LFUN_ARROW))!=-1 ||    (i = FIND_LFUN(p,LFUN_ASSIGN_ARROW));
6747:    push_type(arg_type->type);    return pop_unfinished_type();    } +  /* FALL_THROUGH */ +     case T_ARRAY:    case T_MULTISET:    /* Keep void! */