commit 69ce23d6739e4713fbb8b86d87e8a26f99ff7fd7
parent 68ec07738ae82e1d945b94225687465d406e7069
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Mon, 8 Oct 2018 13:29:21 +0200
Added some NULL checks in passwordstore.c to avoid potential crash.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/passwordstore.c b/src/passwordstore.c
@@ -307,7 +307,7 @@ void passwd_store_reencrypt_all(const gchar *old_mpwd,
debug_print("Reencrypting passwords in block (%d/%s).\n",
block->block_type, block->block_name);
- if (g_hash_table_size(block->entries) == 0)
+ if (block->entries == NULL || g_hash_table_size(block->entries) == 0)
continue;
keys = g_hash_table_get_keys(block->entries);