projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1cfe78b
)
Added some NULL checks in passwordstore.c to avoid potential crash.
author
Andrej Kacian
<ticho@claws-mail.org>
Mon, 8 Oct 2018 11:29:21 +0000
(13:29 +0200)
committer
Andrej Kacian
<ticho@claws-mail.org>
Mon, 8 Oct 2018 11:29:21 +0000
(13:29 +0200)
src/passwordstore.c
patch
|
blob
|
history
diff --git
a/src/passwordstore.c
b/src/passwordstore.c
index 4411711242f712b5093bca23d13d785693283209..cd56c1b0a4db2ca6bbce29ee12b87fbe2b149548 100644
(file)
--- 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);
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);
continue;
keys = g_hash_table_get_keys(block->entries);