diff options
Diffstat (limited to 'addressbook/gui/component/select-names')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-model.c | 7 |
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); } |