[evolution-patches] [gtkhtml] #69634 Copy-paste over selection causes data corruption
- From: Radek Doulík <rodo novell com>
- To: Patches <evolution-patches ximian com>
- Cc: Larry Ewing <lewing ximian com>
- Subject: [evolution-patches] [gtkhtml] #69634 Copy-paste over selection causes data corruption
- Date: Thu, 02 Dec 2004 15:43:49 +0100
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2035.2.9
diff -u -p -r1.2035.2.9 ChangeLog
--- ChangeLog 18 Oct 2004 15:20:26 -0000 1.2035.2.9
+++ ChangeLog 2 Dec 2004 14:42:36 -0000
@@ -1,3 +1,10 @@
+2004-12-02 Radek Doulik <rodo ximian com>
+
+ * htmltext.c (html_text_init): make sure text_bytes is initialized
+ correctly in case we call with str longer than requested len
+
+ Fixes #69634
+
2004-10-13 Radek Doulik <rodo ximian com>
* htmlengine-edit-text.c (upper_lower): set text_len and
Index: htmltext.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmltext.c,v
retrieving revision 1.260.2.4
diff -u -p -r1.260.2.4 htmltext.c
--- htmltext.c 8 Oct 2004 13:23:12 -0000 1.260.2.4
+++ htmltext.c 2 Dec 2004 14:42:36 -0000
@@ -2434,8 +2434,8 @@ html_text_init (HTMLText *text,
html_object_init (HTML_OBJECT (text), HTML_OBJECT_CLASS (klass));
text->text_len = text_len (&str, len);
- text->text_bytes = strlen (str);
- text->text = g_strndup (str, g_utf8_offset_to_pointer (str, text->text_len) - str);
+ text->text_bytes = g_utf8_offset_to_pointer (str, text->text_len) - str;
+ text->text = g_strndup (str, text->text_bytes);
text->font_style = font_style;
text->face = NULL;
text->color = color;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]