From: dan Date: Fri, 4 Dec 2009 19:07:24 +0000 (+0000) Subject: Fix a problem involving a 3-way NEAR query. X-Git-Tag: version-3.7.2~750 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=165b67cb3636c121261fc760cb605cc934320462;p=thirdparty%2Fsqlite.git Fix a problem involving a 3-way NEAR query. FossilOrigin-Name: 507890a9139875b1b594225c432c714f67312c0e --- diff --git a/ext/fts3/fts3.c b/ext/fts3/fts3.c index e1a84cfdc0..0ca6d41503 100644 --- a/ext/fts3/fts3.c +++ b/ext/fts3/fts3.c @@ -1051,6 +1051,8 @@ static void fts3PoslistCopy(char **pp, char **ppPoslist){ static void fts3ColumnlistCopy(char **pp, char **ppPoslist){ char *pEnd = *ppPoslist; char c = 0; + + /* A column-list is terminated by either a 0x01 or 0x00. */ while( 0xFE & (*pEnd | c) ) c = *pEnd++ & 0x80; if( pp ){ int n = (int)(pEnd - *ppPoslist); @@ -1106,8 +1108,20 @@ static void fts3PoslistMerge( if( 0==(*p2&0xFE) ) i2 = 0x7FFFFFFF; } }else if( iCol1