aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-10-02 21:55:18 +0800
committerChris Lahey <clahey@src.gnome.org>2001-10-02 21:55:18 +0800
commit1f42dd58510c9ba39863242c6da2d9d8fe024c1c (patch)
tree19124c5ab8f06bbb9283e2552c5ea94bca50ccd7 /addressbook/gui/component
parentf6be515182c311c81b108d992597dc66aa401227 (diff)
downloadgsoc2013-evolution-1f42dd58510c9ba39863242c6da2d9d8fe024c1c.tar.gz
gsoc2013-evolution-1f42dd58510c9ba39863242c6da2d9d8fe024c1c.tar.zst
gsoc2013-evolution-1f42dd58510c9ba39863242c6da2d9d8fe024c1c.zip
Made the max length of the textification be 2047 characters. Fixes Ximian
2001-10-02 Christopher James Lahey <clahey@ximian.com> * gui/component/select-names/e-select-names-model.c (e_select_names_model_get_textification): Made the max length of the textification be 2047 characters. Fixes Ximian bug #3021. svn path=/trunk/; revision=13299
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/select-names/e-select-names-model.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-model.c b/addressbook/gui/component/select-names/e-select-names-model.c
index 89838f9b82..138b0d73ad 100644
--- a/addressbook/gui/component/select-names/e-select-names-model.c
+++ b/addressbook/gui/component/select-names/e-select-names-model.c
@@ -23,6 +23,8 @@
#define SEPARATOR ", "
#define SEPLEN (strlen(SEPARATOR))
+#define MAX_LENGTH 2047
+
enum {
E_SELECT_NAMES_MODEL_CHANGED,
@@ -287,6 +289,11 @@ e_select_names_model_get_textification (ESelectNamesModel *model)
}
model->priv->text = g_strjoinv (SEPARATOR, strv);
+
+ if (strlen(model->priv->text) > MAX_LENGTH) {
+ model->priv->text[MAX_LENGTH] = 0;
+ g_realloc (model->priv->text, MAX_LENGTH + 1);
+ }
g_free (strv);
}