GP-1796 NULL ptr accesses on rare paths

This commit is contained in:
caheckman 2022-03-04 13:29:49 -05:00
parent 1996cdacd1
commit 45eeb7cfb2
6 changed files with 29 additions and 14 deletions

View file

@ -2064,6 +2064,9 @@ GrammarToken::GrammarToken(void)
{
type = 0;
value.integer = 0;
lineno = -1;
colno = -1;
filenum = -1;
}
GrammarLexer::GrammarLexer(int4 maxbuffer)
@ -2617,6 +2620,9 @@ CParse::CParse(Architecture *g,int4 maxbuf)
{
glb = g;
firsttoken = -1;
lineno = -1;
colno = -1;
filenum = -1;
lastdecls = (vector<TypeDeclarator *> *)0;
keywords["typedef"] = f_typedef;
keywords["extern"] = f_extern;