1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix a segfault in Lemon that occurs if the input grammar does not define

a type for tokens.  This does not effect SQLite since the SQLite grammar
does define a type for tokens. (CVS 6451)

FossilOrigin-Name: 4424aee958b2e764a61141b5c66c063e36ed5aae
This commit is contained in:
drh
2009-04-05 15:18:02 +00:00
parent ea598cbd8d
commit 02368c983f
3 changed files with 8 additions and 8 deletions

View File

@ -3432,7 +3432,7 @@ int mhflag; /* True if generating makeheaders output */
while( *cp ) stddt[j++] = *cp++;
while( j>0 && isspace(stddt[j-1]) ) j--;
stddt[j] = 0;
if( strcmp(stddt, lemp->tokentype)==0 ){
if( lemp->tokentype && strcmp(stddt, lemp->tokentype)==0 ){
sp->dtnum = 0;
continue;
}