projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1f8a152
)
Fix crash on deleting password from passwordstore.
author
Andrej Kacian
<ticho@claws-mail.org>
Sat, 9 Apr 2016 13:21:13 +0000
(15:21 +0200)
committer
Andrej Kacian
<ticho@claws-mail.org>
Sat, 9 Apr 2016 13:21:13 +0000
(15:21 +0200)
src/passwordstore.c
patch
|
blob
|
history
diff --git
a/src/passwordstore.c
b/src/passwordstore.c
index d2394d8f32166879e0a77d5274e0c10ebe71b349..2694d8931530c0abfcf64641b30f133ca7505486 100644
(file)
--- a/
src/passwordstore.c
+++ b/
src/passwordstore.c
@@
-107,7
+107,7
@@
gboolean passwd_store_set(PasswordBlockType block_type,
const gchar *password,
gboolean encrypted)
{
const gchar *password,
gboolean encrypted)
{
- const gchar *p
= password
;
+ const gchar *p;
PasswordBlock *block;
gchar *encrypted_password;
PasswordBlock *block;
gchar *encrypted_password;
@@
-117,8
+117,10
@@
gboolean passwd_store_set(PasswordBlockType block_type,
g_return_val_if_fail(password_id != NULL, FALSE);
/* Empty password string equals null password for us. */
g_return_val_if_fail(password_id != NULL, FALSE);
/* Empty password string equals null password for us. */
- if (strlen(password) == 0)
+ if (
password == NULL ||
strlen(password) == 0)
p = NULL;
p = NULL;
+ else
+ p = password;
debug_print("%s password '%s' in block (%d/%s)%s\n",
(p == NULL ? "Deleting" : "Storing"),
debug_print("%s password '%s' in block (%d/%s)%s\n",
(p == NULL ? "Deleting" : "Storing"),