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

Make sure the extra bytes allocated for the saved cursor position by

check-in [160b1e31c0f27257] are initialized to zero.

FossilOrigin-Name: 2737564929e86ead84a3ff6512369268198d38b46e3e02866f8ce34babc76cb9
This commit is contained in:
drh
2019-01-21 16:01:17 +00:00
parent 50b910a8b5
commit e6c628e98c
3 changed files with 8 additions and 7 deletions

View File

@@ -672,6 +672,7 @@ static int saveCursorKey(BtCursor *pCur){
if( pKey ){
rc = sqlite3BtreePayload(pCur, 0, (int)pCur->nKey, pKey);
if( rc==SQLITE_OK ){
memset(((u8*)pKey)+pCur->nKey, 0, 9+8);
pCur->pKey = pKey;
}else{
sqlite3_free(pKey);