* src/widgets/modest-recpt-editor.c:
authorJose Dapena Paz <jdapena@igalia.com>
Tue, 4 Sep 2007 09:03:02 +0000 (09:03 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Tue, 4 Sep 2007 09:03:02 +0000 (09:03 +0000)
* Limited text insertion to 1024 characters. This should prevent
  getting too big input (fixes NB#64721).

pmo-trunk-r3196

src/widgets/modest-recpt-editor.c

index 448bebe..5e66325 100644 (file)
@@ -537,6 +537,9 @@ modest_recpt_editor_on_insert_text (GtkTextBuffer *buffer,
        GtkTextIter prev;
        gunichar prev_char;
        ModestRecptEditorPrivate *priv = MODEST_RECPT_EDITOR_GET_PRIVATE (editor);
+       
+       if (len > 1024)
+               len = 1024;
 
        if (!is_valid_insert (text, len)) {
                gchar *new_text = create_valid_text (text, len);