From: drh Date: Fri, 13 Oct 2006 12:25:29 +0000 (+0000) Subject: Avoid expanding %d contained in the action of a lemon parser rule. X-Git-Tag: version-3.6.10~2691 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5048962a0f854e05eac7a511bbc40a9078212952;p=thirdparty%2Fsqlite.git Avoid expanding %d contained in the action of a lemon parser rule. Ticket #1063. This is a fix for lemon only. It does not effect SQLite. (CVS 3476) FossilOrigin-Name: 81daedcf48372949b9df009ce6121a514ecf6f2e --- diff --git a/manifest b/manifest index fa5c704a4d..435e01ddd4 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Removing\sdebugging\sprintf\sfrom\sthe\sporter\sstemmer\scode.\s\sTicket\s#2016.\s(CVS\s3475) -D 2006-10-13T11:55:39 +C Avoid\sexpanding\s%d\scontained\sin\sthe\saction\sof\sa\slemon\sparser\srule.\nTicket\s#1063.\s\sThis\sis\sa\sfix\sfor\slemon\sonly.\s\sIt\sdoes\snot\seffect\sSQLite.\s(CVS\s3476) +D 2006-10-13T12:25:30 F Makefile.in 4379c909d46b38b8c5db3533084601621d4f14b2 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -339,7 +339,7 @@ F test/where.test ee7c9a6659b07e1ee61177f6e7ff71565ee2c9df F test/where2.test a16476a5913e75cf65b38f2daa6157a6b7791394 F test/where3.test 3b5ad2c58069e12be2bd86bc5e211a82810521aa F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b -F tool/lemon.c b71e494b59ffd4a878e22c00e33e442958a4a1f5 +F tool/lemon.c 4e62a7119a9da4c5178ec095784ca7d44c77ce71 F tool/lempar.c 0a2a5cf96a98a64a5594625ad8fbdbe41dbaca50 F tool/memleak.awk 4e7690a51bf3ed757e611273d43fe3f65b510133 F tool/memleak2.awk 9cc20c8e8f3c675efac71ea0721ee6874a1566e8 @@ -410,7 +410,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 85272b2f5394e37916afb1d509e7296810d976f5 -R 5d84b50f60621ffc331c314efefc7a21 +P 7a08c6272f76d53b13313019b4f9da3c8f02b650 +R 72da244980a6657de96aa81c8ad2d32c U drh -Z 3eb43f333e7468bac109c81c88741443 +Z 11de7993c61aa0125c5ab72259d0a36b diff --git a/manifest.uuid b/manifest.uuid index f9953d34b4..2243febd0f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7a08c6272f76d53b13313019b4f9da3c8f02b650 \ No newline at end of file +81daedcf48372949b9df009ce6121a514ecf6f2e \ No newline at end of file diff --git a/tool/lemon.c b/tool/lemon.c index 759e1c3786..2dd2a46ed4 100644 --- a/tool/lemon.c +++ b/tool/lemon.c @@ -3166,7 +3166,7 @@ PRIVATE char *append_str(char *zText, int n, int p1, int p2){ if( z==0 ) return ""; while( n-- > 0 ){ c = *(zText++); - if( c=='%' && zText[0]=='d' ){ + if( c=='%' && n>0 && zText[0]=='d' ){ sprintf(zInt, "%d", p1); p1 = p2; strcpy(&z[used], zInt);