mirror of
https://github.com/status-im/sqlcipher.git
synced 2026-08-30 22:11:14 +00:00
fix cast for memset
This commit is contained in:
+2
-2
@@ -684,7 +684,7 @@ static void* sqlite3Codec(void *iCtx, void *data, Pgno pgno, int mode) {
|
||||
|
||||
rc = sqlcipher_page_cipher(ctx, cctx, pgno, CIPHER_DECRYPT, page_sz - offset, pData + offset, (unsigned char*)buffer + offset);
|
||||
if(rc != SQLITE_OK) { /* clear results of failed cipher operation and set error */
|
||||
sqlcipher_memset(buffer+offset, 0, page_sz-offset);
|
||||
sqlcipher_memset((unsigned char*) buffer+offset, 0, page_sz-offset);
|
||||
sqlcipher_codec_ctx_set_error(ctx, rc);
|
||||
}
|
||||
memcpy(pData, buffer, page_sz); /* copy buffer data back to pData and return */
|
||||
@@ -706,7 +706,7 @@ static void* sqlite3Codec(void *iCtx, void *data, Pgno pgno, int mode) {
|
||||
}
|
||||
rc = sqlcipher_page_cipher(ctx, cctx, pgno, CIPHER_ENCRYPT, page_sz - offset, pData + offset, (unsigned char*)buffer + offset);
|
||||
if(rc != SQLITE_OK) { /* clear results of failed cipher operation and set error */
|
||||
sqlcipher_memset(buffer+offset, 0, page_sz-offset);
|
||||
sqlcipher_memset((unsigned char*)buffer+offset, 0, page_sz-offset);
|
||||
sqlcipher_codec_ctx_set_error(ctx, rc);
|
||||
}
|
||||
return buffer; /* return persistent buffer data, pData remains intact */
|
||||
|
||||
Reference in New Issue
Block a user