projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb130cb
)
Fix segfault when account password is not saved…
author
Ricardo Mones
<ricardo@mones.org>
Sat, 6 Feb 2016 22:49:51 +0000
(23:49 +0100)
committer
Ricardo Mones
<ricardo@mones.org>
Sat, 6 Feb 2016 22:49:51 +0000
(23:49 +0100)
…in account preferences, introduced also in
54adfb4
.
In this case acc_pass is NULL, so it must be checked
before trying to dereference it.
src/imap.c
patch
|
blob
|
history
diff --git
a/src/imap.c
b/src/imap.c
index df0fbc57f745cb33a2f46737c9280e2bb9077b4a..d5df6dc1884cf39f70b42663f15d150db3df6a6d 100644
(file)
--- a/
src/imap.c
+++ b/
src/imap.c
@@
-1306,8
+1306,10
@@
try_again:
return ok;
}
- memset(acc_pass, 0, strlen(acc_pass));
- g_free(acc_pass);
+ if (acc_pass) {
+ memset(acc_pass, 0, strlen(acc_pass));
+ g_free(acc_pass);
+ }
statuswindow_pop_all();
session->authenticated = TRUE;
return MAILIMAP_NO_ERROR;