From: dan Date: Thu, 19 Mar 2015 15:52:07 +0000 (+0000) Subject: Silently ignore any attempt to add a prefix index for prefixes zero bytes in size... X-Git-Tag: version-3.8.9~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0417626ea42db7a6857bc2c5eaf8aa3c5b9237f;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. FossilOrigin-Name: ad4b19d2ac0889a23fe3b0fd844286efc10cdd82 --- diff --git a/ext/fts3/fts3.c b/ext/fts3/fts3.c index a31d3f13fe..3c229403b4 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