Branch: Tag:

2014-12-04

2014-12-04 19:25:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Fixed potential NULL-deref.

If the parse tree has extraneous NULLs, the code generator could
theoretically attempt to dereference them.

Fixes complaint by Coverity.

2511:    if(!(flags & DO_NOT_COPY))    {    while(n && (n->token==F_INDEX || n->token==F_ARROW)) n=CAR(n); -  if(n->token==F_CONSTANT && !(n->node_info & OPT_EXTERNAL_DEPEND)) +  if(n && (n->token==F_CONSTANT) && !(n->node_info & OPT_EXTERNAL_DEPEND))    emit0(F_COPY_VALUE);    }    }