From 7d0f957f2782dbc603d8a081e9fe5a201a96b369 Mon Sep 17 00:00:00 2001 From: "Maciej J. Karpiuk" Date: Wed, 15 Oct 2014 16:24:28 +0200 Subject: [PATCH] Valgrind warnings removed: all changes were false-positive issues. Change-Id: I7ff0e4e6ab21ab570fddc9a63432a399c4ed402b --- src/manager/sqlcipher/sqlcipher.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/manager/sqlcipher/sqlcipher.c b/src/manager/sqlcipher/sqlcipher.c index 69e2822..0676c94 100644 --- a/src/manager/sqlcipher/sqlcipher.c +++ b/src/manager/sqlcipher/sqlcipher.c @@ -13491,6 +13491,7 @@ int sqlcipher_codec_ctx_set_pagesize(codec_ctx *ctx, int size) { operations to avoid overhead of multiple memory allocations*/ ctx->buffer = sqlcipher_malloc(size); if(ctx->buffer == NULL) return SQLCIPHER_NOMEM; + memset(ctx->buffer, 0, size); return SQLCIPHER_OK; } @@ -13515,6 +13516,7 @@ int sqlcipher_codec_ctx_init(codec_ctx **iCtx, Db *pDb, Pager *pPager, sqlcipher ctx->kdf_salt_sz = FILE_HEADER_SZ; ctx->kdf_salt = sqlcipher_malloc(ctx->kdf_salt_sz); if(ctx->kdf_salt == NULL) return SQLCIPHER_NOMEM; + memset(ctx->kdf_salt, 0, ctx->kdf_salt_sz); /* allocate space for separate hmac salt data. We want the HMAC derivation salt to be different than the encryption -- 2.7.4