Blob Blame History Raw
Subject: [PATCH] Further improve detection of corrupt records in fts3

---
 ext/fts3/fts3_write.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/fts3/fts3_write.c b/ext/fts3/fts3_write.c
index 5330b4c..0647bd7 100644
--- a/ext/fts3/fts3_write.c
+++ b/ext/fts3/fts3_write.c
@@ -1376,7 +1376,7 @@ static int fts3SegReaderNext(
   pNext += fts3GetVarint32(pNext, &nSuffix);
   if( nSuffix<=0 
    || (&pReader->aNode[pReader->nNode] - pNext)<nSuffix
-   || nPrefix>pReader->nTermAlloc
+   || nPrefix>pReader->nTerm
   ){
     return FTS_CORRUPT_VTAB;
   }
-- 
2.30.2