mirror of
https://github.com/status-im/sqlcipher.git
synced 2025-02-23 09:18:11 +00:00
skip PAGER_MJ_PGNO during cipher_integrity_check
This commit is contained in:
parent
4673c7af93
commit
b0dcc5cbd0
@ -1278,6 +1278,9 @@ int sqlcipher_codec_ctx_integrity_check(codec_ctx *ctx, Parse *pParse, char *col
|
|||||||
int payload_sz = ctx->page_sz - ctx->reserve_sz + ctx->iv_sz;
|
int payload_sz = ctx->page_sz - ctx->reserve_sz + ctx->iv_sz;
|
||||||
int read_sz = ctx->page_sz;
|
int read_sz = ctx->page_sz;
|
||||||
|
|
||||||
|
/* skip integrity check on PAGER_MJ_PGNO since it will have no valid content */
|
||||||
|
if(sqlite3pager_is_mj_pgno(ctx->pBt->pBt->pPager, page)) continue;
|
||||||
|
|
||||||
if(page==1) {
|
if(page==1) {
|
||||||
int page1_offset = ctx->plaintext_header_sz ? ctx->plaintext_header_sz : FILE_HEADER_SZ;
|
int page1_offset = ctx->plaintext_header_sz ? ctx->plaintext_header_sz : FILE_HEADER_SZ;
|
||||||
read_sz = read_sz - page1_offset;
|
read_sz = read_sz - page1_offset;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user