r22691 - in /desktop/unstable/yelp/debian: changelog patches/05_fix_xml_generation.patch patches/series

kov at users.alioth.debian.org kov at users.alioth.debian.org
Mon Dec 28 01:52:48 UTC 2009


Author: kov
Date: Mon Dec 28 01:52:47 2009
New Revision: 22691

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=22691
Log:
New patch from upstream to fix XML generation

Added:
    desktop/unstable/yelp/debian/patches/05_fix_xml_generation.patch
Modified:
    desktop/unstable/yelp/debian/changelog
    desktop/unstable/yelp/debian/patches/series

Modified: desktop/unstable/yelp/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/yelp/debian/changelog?rev=22691&op=diff
==============================================================================
--- desktop/unstable/yelp/debian/changelog [utf-8] (original)
+++ desktop/unstable/yelp/debian/changelog [utf-8] Mon Dec 28 01:52:47 2009
@@ -1,3 +1,11 @@
+yelp (2.28.0+webkit-2) unstable; urgency=low
+
+  * debian/patches/05_fix_xml_generation.patch:
+  - Patch from upstream to make yelp generate XML code without garbage
+    (Closes: #554842)
+
+ -- Gustavo Noronha Silva <kov at debian.org>  Sun, 27 Dec 2009 23:52:18 -0200
+
 yelp (2.28.0+webkit-1) unstable; urgency=low
 
   * New upstream release, based on the freshly merged webkit branch.

Added: desktop/unstable/yelp/debian/patches/05_fix_xml_generation.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/yelp/debian/patches/05_fix_xml_generation.patch?rev=22691&op=file
==============================================================================
--- desktop/unstable/yelp/debian/patches/05_fix_xml_generation.patch (added)
+++ desktop/unstable/yelp/debian/patches/05_fix_xml_generation.patch [utf-8] Mon Dec 28 01:52:47 2009
@@ -1,0 +1,70 @@
+From 379145060b8fc90fa7c81c0bff20d025e61adc38 Mon Sep 17 00:00:00 2001
+From: Gustavo Noronha Silva <gns at gnome.org>
+Date: Sun, 27 Dec 2009 23:43:06 -0200
+Subject: [PATCH] Use GString instead of a plain string to hold content
+
+Yelp was holding the string that it gives WebKit for loading in a
+plain string, and ignoring the explicit length argument. In some cases
+the string was not correctly terminated by \0, and the document ended
+up with garbage. This was causing most of the XML parsing error
+messages that were being observed.
+
+This patch was made with help from Luciana Fujii <luciana at fujii.eti.br>.
+---
+ src/yelp-html.c |   15 +++++++--------
+ 1 files changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/src/yelp-html.c b/src/yelp-html.c
+index bc07c37..fae9274 100644
+--- a/src/yelp-html.c
++++ b/src/yelp-html.c
+@@ -38,7 +38,7 @@
+ #define YELP_HTML_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), YELP_TYPE_HTML, YelpHtmlPriv))
+ 
+ struct _YelpHtmlPriv {
+-    gchar *content;
++    GString     *content;
+     gchar *mime;
+     gchar       *find_string;
+     gboolean    initialised;
+@@ -347,7 +347,8 @@ yelp_html_open_stream (YelpHtml *html, const gchar *mime)
+     debug_print (DB_FUNCTION, "entering\n");
+ 
+     html->priv->frames_enabled = FALSE;
+-    g_free (html->priv->content);
++    if (html->priv->content)
++	g_string_free (html->priv->content, TRUE);
+     html->priv->content = NULL;
+     g_free (html->priv->mime);
+     html->priv->mime = g_strdup(mime);
+@@ -365,11 +366,9 @@ yelp_html_write (YelpHtml *html, const gchar *data, gint len)
+     debug_print (DB_ARG, "  len  = %i\n", len);
+ 
+     if (html->priv->content) {
+-	tmp = g_strjoin (NULL, html->priv->content, data, NULL);
+-	g_free (html->priv->content);
+-	html->priv->content = tmp;
++	g_string_append_len (html->priv->content, data, len);
+     } else {
+-	html->priv->content = g_strdup (data);
++	html->priv->content = g_string_new_len (data, len);
+     }
+ }
+ 
+@@ -413,11 +412,11 @@ yelp_html_close (YelpHtml *html)
+     }
+ 
+     webkit_web_view_load_string (WEBKIT_WEB_VIEW (html),
+-				 html->priv->content,
++				 html->priv->content->str,
+ 				 html->priv->mime,
+ 				 NULL,
+ 				 html->priv->base_uri);
+-    g_free (html->priv->content);
++    g_string_free (html->priv->content, TRUE);
+     html->priv->content = NULL;
+     g_free (html->priv->mime);
+     html->priv->mime = NULL;
+-- 
+1.6.5.7
+

Modified: desktop/unstable/yelp/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/yelp/debian/patches/series?rev=22691&op=diff
==============================================================================
--- desktop/unstable/yelp/debian/patches/series [utf-8] (original)
+++ desktop/unstable/yelp/debian/patches/series [utf-8] Mon Dec 28 01:52:47 2009
@@ -1,3 +1,4 @@
 02_man-utf8.patch
 03_info_crasher.patch
 #04_use_doc-base.patch
+05_fix_xml_generation.patch




More information about the pkg-gnome-commits mailing list