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

Fix a harmless UBSAN warning associated with PRAGMA schema_version

found by OSSFuzz.

FossilOrigin-Name: e93fd170ce4ae91d572c46d03f68f55d00091d0188030517455017d90d212587
This commit is contained in:
drh
2022-06-24 12:56:48 +00:00
parent a5ec23a705
commit 86bc5e41bb
3 changed files with 9 additions and 9 deletions

View File

@@ -3959,7 +3959,7 @@ case OP_SetCookie: {
rc = sqlite3BtreeUpdateMeta(pDb->pBt, pOp->p2, pOp->p3);
if( pOp->p2==BTREE_SCHEMA_VERSION ){
/* When the schema cookie changes, record the new cookie internally */
pDb->pSchema->schema_cookie = pOp->p3 - pOp->p5;
*(u32*)&pDb->pSchema->schema_cookie = *(u32*)&pOp->p3 - pOp->p5;
db->mDbFlags |= DBFLAG_SchemaChange;
sqlite3FkClearTriggerCache(db, pOp->p1);
}else if( pOp->p2==BTREE_FILE_FORMAT ){