aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index f5339c55fb..b472de0e6b 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-15 Sivaiah Nallagatla <snallagatla@novell.com>
+
+ * gui/contact-editor/e-contact-editor.c (enable_writable_fields) :
+ loop only up to < G_N_ELEMENTS instead of <= G_N_ELEMENTS. Prevents
+ out of bound indexing of addresses array
+
2004-03-15 Hao Sheng <hao.sheng@sun.com>
* gui/component/Makefile.am : build a11y/addressbook dir
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 0b64e0a94e..dd781a0db8 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -3164,7 +3164,7 @@ enable_writable_fields(EContactEditor *editor)
g_hash_table_insert (supported_hash, field, field);
}
- for (i = 0; i <= G_N_ELEMENTS (addresses); i ++) {
+ for (i = 0; i < G_N_ELEMENTS (addresses); i ++) {
if (!strcmp (field, e_contact_field_name (addresses[i]))) {
editor->address_editable [i] = TRUE;
}