]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a segfault in Lemon that occurs if the input grammar does not define
authordrh <drh@noemail.net>
Sun, 5 Apr 2009 15:18:02 +0000 (15:18 +0000)
committerdrh <drh@noemail.net>
Sun, 5 Apr 2009 15:18:02 +0000 (15:18 +0000)
a type for tokens.  This does not effect SQLite since the SQLite grammar
does define a type for tokens. (CVS 6451)

FossilOrigin-Name: 4424aee958b2e764a61141b5c66c063e36ed5aae

manifest
manifest.uuid
tool/lemon.c

index 7d0c6196258c48dde1eaa9635dd21db68d9a5c4b..ab4ae30f165d155514e0b523e09e7a8cb2bb70b6 100644 (file)
--- a/manifest
+++ b/manifest
@@ -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
index 5bde7c5ef5697e9549201b397079a08623ae82f7..036ed8598843ccadb52ce98ce4bf4067607bc08d 100644 (file)
@@ -1 +1 @@
-208382e032134d9c78fe1cfcb98ce9defb4e3e26
\ No newline at end of file
+4424aee958b2e764a61141b5c66c063e36ed5aae
\ No newline at end of file
index f2869da97f56cb4219516023ea5ca566854df860..661069262c63981bf792ed83a5b9cfff45abb43d 100644 (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;
     }