Skip to content

Commit

Permalink
Fix uninitialized codec->pagesize (#26)
Browse files Browse the repository at this point in the history
Caused rekeying to fail after decrypting the whole database.
  • Loading branch information
resilar committed Sep 17, 2019
1 parent 3846c2f commit 4a6f062
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sqleet.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ Codec *codec_new(const void *zKey, int nKey, Codec *from)
codec->kdf = from->kdf;
} else {
codec->reader = codec->writer = codec;
memset(codec->key, 0, sizeof(codec->key));
memset(codec->salt, 0, sizeof(codec->salt));
codec->flags = 0;
codec->pagesize = 0;
}
codec->pagebuf = NULL;
codec->zKey = zKey;
Expand Down

0 comments on commit 4a6f062

Please sign in to comment.