From: dan Date: Wed, 20 May 2015 19:32:18 +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=0bed375d9a16b172c07daacf0015b1ab7701cd13;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 of [ad4b19d2ac0889a2]. FossilOrigin-Name: ff7be4db8473fa850088e9b66231ba241a7543eb --- diff --git a/ext/fts3/fts3.c b/ext/fts3/fts3.c index 4f4b667430..4ea6bf327f 100644 --- a/ext/fts3/fts3.c +++ b/ext/fts3/fts3.c @@ -957,7 +957,6 @@ static int fts3PrefixParameter( aIndex = sqlite3_malloc(sizeof(struct Fts3Index) * nIndex); *apIndex = aIndex; - *pnIndex = nIndex; if( !aIndex ){ return SQLITE_NOMEM; } @@ -969,11 +968,17 @@ static int fts3PrefixParameter( for(i=1; i