aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-06-25 09:18:34 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-06-25 09:18:34 +0000
commit8edb1a69ed54525f32b3e0c20de5633b2cc7aa59 (patch)
treee0e62ea19c8867ba5d3a800aaf01ade59834c3dd
parentb1235a764827a18aa8db3e47083b95f075d13b61 (diff)
addressbook.c: null-check person to avoid crash.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1795 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja6
-rw-r--r--NEWS1
-rw-r--r--src/addressbook.c2
4 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8fbcd1d6..9ea5bdbd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-25
+
+ * src/addressbook.c: addressbook_format_address(): null-check person
+ to avoid crash (thanks to Michael Schwendt).
+
2007-06-22
* src/about.c: place cursor at the start (fixed unintended scroll
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 70329594..bee6b6c6 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,9 @@
+2007-06-25
+
+ * src/addressbook.c: addressbook_format_address(): クラッシュ防止の
+ ために person の null チェックを行うようにした(Michael Schwendt
+ さん thanks)。
+
2007-06-22
* src/about.c: カーソルを開始位置に置くようにした(win32 での意図し
diff --git a/NEWS b/NEWS
index 5e154cdd..54b9ce4d 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Changes of Sylpheed
* The quick search entry is cleared when Escape key is pressed on it.
* UTF-8 with BOM is handled correctly when inserting signature.
+ * Fixed a possible crash when adding address from address book.
* Win32: Sylpheed now can be specified as a default mail program in
Windows Vista.
* Win32: The stall of SMTP session when sending messages via dial-up
diff --git a/src/addressbook.c b/src/addressbook.c
index 3894797c..bee48819 100644
--- a/src/addressbook.c
+++ b/src/addressbook.c
@@ -978,7 +978,7 @@ gchar *addressbook_format_address( AddressObject * obj ) {
name = ADDRITEM_NAME(person);
}
}
- else if( ADDRITEM_NAME(person) ) {
+ else if( person && ADDRITEM_NAME(person) ) {
name = ADDRITEM_NAME(person);
}
else {