Fix another problem in fts5 caused by a corrupt schema record.

FossilOrigin-Name: ff45f9dd69fe1e1c7875e5bb73ac3dde2a31746475d3765cda9233f8e06e26ca
This commit is contained in:
dan
2018-12-27 15:36:16 +00:00
parent 57e141bc28
commit e80834f6ff
4 changed files with 98 additions and 9 deletions
+3
View File
@@ -860,6 +860,9 @@ static int fts5StructureDecode(
** structure record. */
i += fts5GetVarint32(&pData[i], nLevel);
i += fts5GetVarint32(&pData[i], nSegment);
if( nLevel>FTS5_MAX_SEGMENT || nSegment>FTS5_MAX_SEGMENT ){
return FTS5_CORRUPT;
}
nByte = (
sizeof(Fts5Structure) + /* Main structure */
sizeof(Fts5StructureLevel) * (nLevel-1) /* aLevel[] array */