Branch: Tag:

2014-04-19

2014-04-19 20:10:29 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);    }    }