[libgsf] msole: fix problem writing non-ascii metadata.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsf] msole: fix problem writing non-ascii metadata.
- Date: Sun, 29 Apr 2018 17:08:20 +0000 (UTC)
commit 32ed897a482ec96c4479471a5a33195aa313c4e9
Author: Morten Welinder <terra gnome org>
Date: Sun Apr 29 13:07:38 2018 -0400
msole: fix problem writing non-ascii metadata.
ChangeLog | 5 +++++
NEWS | 3 +++
gsf/gsf-msole-utils.c | 2 +-
3 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8b00e49..e36e6b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-04-29 Morten Welinder <terra gnome org>
+
+ * gsf/gsf-msole-utils.c (msole_metadata_write_string): Write the
+ converted length, not the pre-iconv length. Fixes #795612.
+
2018-04-19 Morten Welinder <terra gnome org>
* configure.ac: Post-release bump.
diff --git a/NEWS b/NEWS
index 6009c23..24aeb1e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
libgsf 1.14.44
+Morten:
+ * Fix msole metadata writing for non-ascii. [#795612]
+
--------------------------------------------------------------------------
libgsf 1.14.43
diff --git a/gsf/gsf-msole-utils.c b/gsf/gsf-msole-utils.c
index 4a02074..287099f 100644
--- a/gsf/gsf-msole-utils.c
+++ b/gsf/gsf-msole-utils.c
@@ -1423,7 +1423,7 @@ msole_metadata_write_string (WritePropState *state, const char *txt)
bytes_written = 0;
}
- GSF_LE_SET_GUINT32 (buf, len + 1);
+ GSF_LE_SET_GUINT32 (buf, bytes_written);
res = gsf_output_write (state->out, 4, buf);
res = res && gsf_output_write (state->out, bytes_written, ctxt);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]