From: Andrej Kacian Date: Mon, 8 Oct 2018 11:29:21 +0000 (+0200) Subject: Added some NULL checks in passwordstore.c to avoid potential crash. X-Git-Tag: 3.17.2~101 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=a0ed7e3b9fa6312b18accef0c0ab5a084e3c2d8d Added some NULL checks in passwordstore.c to avoid potential crash. --- diff --git a/src/passwordstore.c b/src/passwordstore.c index 441171124..cd56c1b0a 100644 --- 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);