diff options
author | Peter Williams <peterw@ximian.com> | 2001-07-10 02:00:53 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-07-10 02:00:53 +0800 |
commit | 04d7e28a0bc12a7f5a30393938a227ad763bfcc6 (patch) | |
tree | 9ee739a99a2fd45ce6ba4742cef9c7547eccdc00 /mail | |
parent | 3b70c584967f35faf61e39df0508023c58b43e94 (diff) | |
download | gsoc2013-evolution-04d7e28a0bc12a7f5a30393938a227ad763bfcc6.tar gsoc2013-evolution-04d7e28a0bc12a7f5a30393938a227ad763bfcc6.tar.gz gsoc2013-evolution-04d7e28a0bc12a7f5a30393938a227ad763bfcc6.tar.bz2 gsoc2013-evolution-04d7e28a0bc12a7f5a30393938a227ad763bfcc6.tar.lz gsoc2013-evolution-04d7e28a0bc12a7f5a30393938a227ad763bfcc6.tar.xz gsoc2013-evolution-04d7e28a0bc12a7f5a30393938a227ad763bfcc6.tar.zst gsoc2013-evolution-04d7e28a0bc12a7f5a30393938a227ad763bfcc6.zip |
Some NULL protection for our strings: pgp_key, html_signature, smime_key.
2001-07-09 Peter Williams <peterw@ximian.com>
* mail-config.c (mail_config_write): Some NULL protection for our strings:
pgp_key, html_signature, smime_key. Probably we should do this for all
strings. Either that or change Bonobo Config.
* message-list.c (message_list_init): Explicitly initialize search to NULL.
Bug 3951 might to be due to a problem wrt this, and it can't hurt.
svn path=/trunk/; revision=10919
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/mail-config.c | 18 | ||||
-rw-r--r-- | mail/message-list.c | 2 |
3 files changed, 25 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 371f94eb7f..031095076b 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2001-07-09 Peter Williams <peterw@ximian.com> + + * mail-config.c (mail_config_write): Some NULL protection for our strings: + pgp_key, html_signature, smime_key. Probably we should do this for all + strings. Either that or change Bonobo Config. + + * message-list.c (message_list_init): Explicitly initialize search to NULL. + Bug 3951 might to be due to a problem wrt this, and it can't hurt. + 2001-07-09 Dan Winship <danw@ximian.com> * mail-display.c (save_part): g_strdup the result of diff --git a/mail/mail-config.c b/mail/mail-config.c index 90210e26e8..de98723925 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -605,7 +605,10 @@ mail_config_write (void) /* account pgp options */ path = g_strdup_printf ("/Mail/Accounts/account_pgp_key_%d", i); - bonobo_config_set_string (config->db, path, account->pgp_key, NULL); + if (account->pgp_key) + bonobo_config_set_string (config->db, path, account->pgp_key, NULL); + else + bonobo_config_set_string (config->db, path, "", NULL); g_free (path); path = g_strdup_printf ("/Mail/Accounts/account_pgp_encrypt_to_self_%d", i); @@ -615,8 +618,12 @@ mail_config_write (void) /* account s/mime options */ path = g_strdup_printf ("/Mail/Accounts/account_smime_key_%d", i); - bonobo_config_set_string (config->db, path, - account->smime_key, NULL); + if (account->smime_key) + bonobo_config_set_string (config->db, path, + account->smime_key, NULL); + else + bonobo_config_set_string (config->db, path, + "", NULL); g_free (path); path = g_strdup_printf ("/Mail/Accounts/account_smime_encrypt_to_self_%d", i); @@ -646,7 +653,10 @@ mail_config_write (void) account->id->signature, NULL); g_free (path); path = g_strdup_printf ("identity_html_signature_%d", i); - bonobo_config_set_string (config->db, path, account->id->html_signature, NULL); + if (account->id->html_signature) + bonobo_config_set_string (config->db, path, account->id->html_signature, NULL); + else + bonobo_config_set_string (config->db, path, "", NULL); g_free (path); path = g_strdup_printf ("identity_has_html_signature_%d", i); bonobo_config_set_boolean (config->db, path, account->id->has_html_signature, NULL); diff --git a/mail/message-list.c b/mail/message-list.c index 92db0ff66f..c5f19abe9e 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -1084,6 +1084,8 @@ message_list_init (GtkObject *object) message_list->hide_before = ML_HIDE_NONE_START; message_list->hide_after = ML_HIDE_NONE_END; + message_list->search = NULL; + message_list->hide_lock = g_mutex_new(); message_list->uid_nodemap = g_hash_table_new (g_str_hash, g_str_equal); |