From 1f42dd58510c9ba39863242c6da2d9d8fe024c1c Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 2 Oct 2001 13:55:18 +0000 Subject: Made the max length of the textification be 2047 characters. Fixes Ximian 2001-10-02 Christopher James Lahey * 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 --- addressbook/gui/component/select-names/e-select-names-model.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'addressbook/gui/component/select-names/e-select-names-model.c') 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); } -- cgit v1.2.3