[gnumeric] Really assign the buffer before using it.
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Really assign the buffer before using it.
- Date: Sun, 3 Oct 2010 19:41:49 +0000 (UTC)
commit 8d85cedf6222173a658c788f9ed124afc95438e8
Author: Jean Brefort <jean brefort normalesup org>
Date: Sun Oct 3 21:43:05 2010 +0200
Really assign the buffer before using it.
plugins/excel/ChangeLog | 5 +++++
plugins/excel/xlsx-write.c | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 0d12de3..66b67a9 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-03 Jean Brefort <jean brefort normalesup org>
+
+ * xlsx-write.c (xlsx_write_rich_text): really assign the buffer before
+ using it.
+
2010-10-01 Morten Welinder <terra gnome org>
* Release 1.10.11
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index 1b566dc..cb23e33 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -1275,7 +1275,7 @@ xlsx_write_rich_text (GsfXMLOut *xml, char const *text, PangoAttrList *attrs)
attr = pango_attr_iterator_get (iter, PANGO_ATTR_FOREGROUND);
if (attr) {
PangoColor *color = &((PangoAttrColor *) attr)->color;
- g_strdup_printf("FF%2x%2x%2x", color->red >> 8, color->green >> 8, color->blue >> 8);
+ buf = g_strdup_printf("FF%2x%2x%2x", color->red >> 8, color->green >> 8, color->blue >> 8);
gsf_xml_out_add_cstr_unchecked (xml, "rgb", buf);
g_free (buf);
} else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]