[evolution-rss] Bug 733139 - Ensure nul-terminated string passed to e_html_editor_view_set_text_html()



commit 1b9c13840f56a94f1b4cca1c5f3a6efbd0170f73
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jul 31 09:33:34 2014 +0200

    Bug 733139 - Ensure nul-terminated string passed to e_html_editor_view_set_text_html()

 src/rss.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/rss.c b/src/rss.c
index 11c7167..957dc56 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -1319,9 +1319,11 @@ org_gnome_evolution_presend (EPlugin *ep, EMEventTargetComposer *t)
                htmlDocDumpMemory(doc, &buff, &size);
                xmlFreeDoc(doc);
 #if EVOLUTION_VERSION >= 31303
+               g_free (text);
+               text = g_strndup ((gchar *) buff, size);
                editor = e_msg_composer_get_editor (t->composer);
                view = e_html_editor_get_view (editor);
-               e_html_editor_view_set_text_html (view, buff);
+               e_html_editor_view_set_text_html (view, text);
 #else
                gtkhtml_editor_set_text_html((GtkhtmlEditor *)t->composer, (gchar *)buff, size);
 #endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]