From 9f95e48d94f0a3c9354d3e394b498561e7e83764 Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 30 Mar 2018 15:59:54 +0000 Subject: [PATCH] Fix an off-by-one error in the dist3 algorithm of the spellfix extension. FossilOrigin-Name: 5c34af7b975598bbe20751dfdd346f43031cb2bcb6b78f1bbdb2b51b398de182 --- ext/misc/spellfix.c | 2 +- manifest | 14 +++++++------- manifest.uuid | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/misc/spellfix.c b/ext/misc/spellfix.c index 8651bb7a9d..e2364fe5b8 100644 --- a/ext/misc/spellfix.c +++ b/ext/misc/spellfix.c @@ -764,7 +764,7 @@ static int editDist3ConfigLoad( assert( zTo!=0 || nTo==0 ); if( nFrom>100 || nTo>100 ) continue; if( iCost<0 ) continue; - if( iCost>10000 ) continue; /* Costs above 10K are considered infinite */ + if( iCost>=10000 ) continue; /* Costs above 10K are considered infinite */ if( pLang==0 || iLang!=iLangPrev ){ EditDist3Lang *pNew; pNew = sqlite3_realloc64(p->a, (p->nLang+1)*sizeof(p->a[0])); diff --git a/manifest b/manifest index 50106f9a03..db56171bcf 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Another\schange\sto\stest\sfile\szipfile.test\sto\shelp\sit\srun\son\ssystems\swithout\s"unzip". -D 2018-03-29T23:54:00.503 +C Fix\san\soff-by-one\serror\sin\sthe\sdist3\salgorithm\sof\sthe\sspellfix\sextension. +D 2018-03-30T15:59:54.149 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F Makefile.in 7016fc56c6b9bfe5daac4f34be8be38d8c0b5fab79ccbfb764d3b23bf1c6fff3 @@ -294,7 +294,7 @@ F ext/misc/series.c f3c0dba5c5c749ce1782b53076108f87cf0b71041eb6023f727a9c50681d F ext/misc/sha1.c 0b9e9b855354910d3ca467bf39099d570e73db56 F ext/misc/shathree.c 9e960ba50483214c6a7a4b1517f8d8cef799e9db381195178c3fd3ad207e10c0 F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52 -F ext/misc/spellfix.c b3a644285cb008f3c10ed4cf04e17adcbc7d62c3911c79d786dfc91c177534f0 +F ext/misc/spellfix.c 28faad8be801b36926cee7f74e8fffcddc2f6c4b56c699f7501ca2eeae316dfb F ext/misc/sqlar.c 57d5bc45cd5492208e451f697404be88f8612527d64c9d42f96b325b64983d74 F ext/misc/stmt.c 6f16443abb3551e3f5813bb13ba19a30e7032830015b0f92fe0c0453045c0a11 F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512 @@ -1717,7 +1717,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P d99022a5a8e4469a87a9fab8a976271e5785524da73ac1d2fae47d00d90fc07a -R 9f04f7bc3b45025e3c2d4d58ad190fe8 -U dan -Z cab730845b87199b1c3155e779670aea +P b6252feb125db16dabf6ce07568159f0002f9053df1b7b600e2614cc9da24873 +R 5bb4c3e3e3df1583429be04eb3b092b3 +U drh +Z 347174e588628be1221ab4287f906f72 diff --git a/manifest.uuid b/manifest.uuid index 0f933d3b28..9fa5e60408 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b6252feb125db16dabf6ce07568159f0002f9053df1b7b600e2614cc9da24873 \ No newline at end of file +5c34af7b975598bbe20751dfdd346f43031cb2bcb6b78f1bbdb2b51b398de182 \ No newline at end of file