initialize memory in sqlcipher_malloc before use

This commit is contained in:
Stephen Lombardo 2012-10-03 08:09:02 -04:00
parent 273558efc6
commit fc04d69470
1 changed files with 1 additions and 0 deletions

View File

@ -186,6 +186,7 @@ void sqlcipher_free(void *ptr, int sz) {
*/
void* sqlcipher_malloc(int sz) {
void *ptr = sqlite3Malloc(sz);
memset(ptr, 0, sz);
#ifndef OMIT_MEMLOCK
if(ptr) {
#if defined(__unix__) || defined(__APPLE__)