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

@ -1,5 +1,5 @@
C Additional\scode\sto\smake\ssure\sand\sto\sassert\sthat\smemory\sallocations\shave\n8-byte\salignment.\s\sTicket\s#3777.\s(CVS\s6450)
D 2009-04-05T12:22:09
C Fix\sa\ssegfault\sin\sLemon\sthat\soccurs\sif\sthe\sinput\sgrammar\sdoes\snot\sdefine\na\stype\sfor\stokens.\s\sThis\sdoes\snot\seffect\sSQLite\ssince\sthe\sSQLite\sgrammar\ndoes\sdefine\sa\stype\sfor\stokens.\s(CVS\s6451)
D 2009-04-05T15:18:03
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -696,7 +696,7 @@ F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
F tool/fragck.tcl 5265a95126abcf6ab357f7efa544787e5963f439
F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4
F tool/genfkey.test eda48d8258f5ad7b3b258ca3323c3c4246a846f2
F tool/lemon.c 0f65442d1c99a865525658a47ddf292f4ac2ec54
F tool/lemon.c 1a94e70103e59f20df8f81539a453629df2aa523
F tool/lempar.c aeba88b8566ff66f8a67c96b3eb2dd95e7d8908d
F tool/mkkeywordhash.c 8e57fbe8c4fe2f1800f9190fd361231cb8558407
F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x
@ -715,7 +715,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P 81931259611ef10de731ea0e38cee92eb8629733
R d1ec9689e8427e115f63f6ba1a6ce699
P 208382e032134d9c78fe1cfcb98ce9defb4e3e26
R d910c4e9dfa053622705d5efbf2ba5ee
U drh
Z d2872fc10d5a41a2536ecb51dcae9785
Z 6862243e084bcfb065a1296a49f3c98a

View File

@ -1 +1 @@
208382e032134d9c78fe1cfcb98ce9defb4e3e26
4424aee958b2e764a61141b5c66c063e36ed5aae

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;
}