[evolution-activesync: 1/2] Recalculate xml_len after sanitising it
- From: dwmw2 <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-activesync: 1/2] Recalculate xml_len after sanitising it
- Date: Thu, 13 Aug 2015 10:56:20 +0000 (UTC)
commit 67ea5940bfa82178ad1c859009c8b00097d17720
Author: David Woodhouse <David Woodhouse intel com>
Date: Thu Aug 13 11:53:55 2015 +0100
Recalculate xml_len after sanitising it
It looks like this is reliably NUL-terminated, thankfully. So just use
strlen() to work out the new length. Otherwise we end up asking libxml2 to
parse a truncated version, which causes all kinds of nasty things to happen.
eas-daemon/libeas/eas-connection.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/eas-daemon/libeas/eas-connection.c b/eas-daemon/libeas/eas-connection.c
index 860dd10..22e54c4 100644
--- a/eas-daemon/libeas/eas-connection.c
+++ b/eas-daemon/libeas/eas-connection.c
@@ -2194,6 +2194,7 @@ handle_server_response (SoupSession *session, SoupMessage *msg, gpointer data)
if (xml)
xml = sanitize_utf8 (xml);
+ xml_len = strlen((char *)xml);
if (getenv ("EAS_CAPTURE_RESPONSE") && (atoi (g_getenv ("EAS_CAPTURE_RESPONSE")) >=
1)) {
write_response_to_file (xml, xml_len);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]