1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Detect a corrupt UnpackedRecord and return SQLITE_CORRUPT prior to calling

sqlite3BtreeMovetoUnpacked().

FossilOrigin-Name: 55ec474db8935ef36fae30da5d11f5701c60c088
This commit is contained in:
drh
2013-11-30 12:49:28 +00:00
parent b202366509
commit 094b7587fc
3 changed files with 11 additions and 7 deletions

View File

@@ -694,6 +694,10 @@ static int btreeMoveto(
);
if( pIdxKey==0 ) return SQLITE_NOMEM;
sqlite3VdbeRecordUnpack(pCur->pKeyInfo, (int)nKey, pKey, pIdxKey);
if( pIdxKey->nField==0 ){
sqlite3DbFree(pCur->pKeyInfo->db, pFree);
return SQLITE_CORRUPT_BKPT;
}
}else{
pIdxKey = 0;
}