From: drh Date: Thu, 21 May 2015 02:24:35 +0000 (+0000) Subject: Silently ignore any attempt to add a prefix index for prefixes zero bytes in size... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed7fe4b7516cdd47a38a5c1715090f57cc4260b8;p=thirdparty%2Fsqlite.git Silently ignore any attempt to add a prefix index for prefixes zero bytes in size to an fts3/4 table. Or any prefix index size so large that it overflows a 32-bit signed integer. Cherrypick [ad4b19d2ac0889a] FossilOrigin-Name: 000197cc4e3874711388d79d9ad5af6f0aba6cf9 --- diff --git a/ext/fts3/fts3.c b/ext/fts3/fts3.c index ca24befb3f..67537896b9 100644 --- a/ext/fts3/fts3.c +++ b/ext/fts3/fts3.c @@ -920,7 +920,6 @@ static int fts3PrefixParameter( aIndex = sqlite3_malloc(sizeof(struct Fts3Index) * nIndex); *apIndex = aIndex; - *pnIndex = nIndex; if( !aIndex ){ return SQLITE_NOMEM; } @@ -932,11 +931,17 @@ static int fts3PrefixParameter( for(i=1; i