[libxslt] Fix a dictionary string usage



commit 54977ed7966847e305a2008cb18892df26eeb065
Author: Chris Evans <cevans chromium org>
Date:   Mon Sep 3 15:50:22 2012 +0800

    Fix a dictionary string usage
    
    Raised in chromium, but also affecting xsltproc
    Also updated AUTHORS to list Chris and other contributors

 AUTHORS             |   45 ++++++++++++++++++++++++++++++++++++++++++++-
 libxslt/templates.c |    7 +++++--
 2 files changed, 49 insertions(+), 3 deletions(-)
---
diff --git a/AUTHORS b/AUTHORS
index 094ebbc..3a70a17 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -5,7 +5,7 @@ Daniel Veillard:
    Used to work at W3C, now Red Hat
    co-chair of W3C XML Linking WG
    invited expert on the W3C XML Core WG
-   Author of libxml upon which this library is based.
+   Author of libxml2 upon which this library is based.
 
 Bjorn Reese:
    breese users sourceforge net
@@ -18,3 +18,46 @@ William Brack <wbrack mmm com hk>
 Thomas Broyer <tbroyer ltgt net>
 
 Igor Zlatkovic <igor zlatkovic com> for the Windows port
+
+Patches gently provided by a multitude of people :
+
+Abhishek Arya <inferno chromium org>
+Ben Walton <bwalton artsci utoronto ca>
+Bjorn Reese <breese src gnome org>
+C. M. Sperberg-McQueen <cmsmcq blackmesatech com>
+Colin Walters <walters verbum org>
+Daniel Mustieles <daniel mustieles gmail com>
+Daniel Richard G <oss teragram com>
+Darin Adler <darin src gnome org>
+ÃRDI Gergo <cactus src gnome org>
+Fatih Demir <kabalak src gnome org>
+Federico Mena Quintero <federico ximian com>
+Frederic Crozat <fcrozat mandriva com>
+Hao Hu <ihaohu gmail com>
+Havoc Pennington <hp pobox com>
+IlyaS <astro courier gmail com>
+jacob berkman <jacob ximian com>
+Jason Viers <bean beanalby net>
+JÃrÃme Carretero <cJ-xslt zougloub eu>
+Joachim Breitner <nomeata debian org>
+Johan Dahlin <zilch src gnome org>
+John Fleck <jfleck inkstain net>
+Jose Maria Celorio <chema src gnome org>
+Julio M. Merino Vidal <jmmv NetBSD org>
+Kasimier T. Buchcik <kbuchcik src gnome org>
+Kjartan Maraas <kmaraas src gnome org>
+Laurence Rowe <l lrowe co uk>
+Malcolm Purvis <malcolm purvis id au>
+Martin <gzlist googlemail com>
+MDT 2002 John Fleck <jfleck inkstain net>
+Michael Bonfils <murlock42 gmail com>
+money_seshu Dronamraju <mcseshu gmail com>
+Nick Wellnhofer <wellnhofer aevum de>
+Nix <nix esperi org uk>
+Pedro F. Giffuni <giffunip tutopia com>
+Peter Williams <peterw ximian com>
+Rob Richards <rrichard src gnome org>
+Roumen Petrov <bugtrack roumenpetrov info>
+Stefan Kost <ensonic users sf net>
+Tomasz KÅoczko <kloczek src gnome org>
+Chris Evans <cevans chromium org>
diff --git a/libxslt/templates.c b/libxslt/templates.c
index 169afd9..4804682 100644
--- a/libxslt/templates.c
+++ b/libxslt/templates.c
@@ -18,6 +18,7 @@
 #include <libxml/globals.h>
 #include <libxml/xmlerror.h>
 #include <libxml/tree.h>
+#include <libxml/dict.h>
 #include <libxml/xpathInternals.h>
 #include <libxml/parserInternals.h>
 #include "xslt.h"
@@ -586,7 +587,8 @@ xsltAttrTemplateProcess(xsltTransformContextPtr ctxt, xmlNodePtr target,
 		}
 	    } else if ((ctxt->internalized) && (target != NULL) &&
 	               (target->doc != NULL) &&
-		       (target->doc->dict == ctxt->dict)) {
+		       (target->doc->dict == ctxt->dict) &&
+		       xmlDictOwns(ctxt->dict, value)) {
 		text->content = (xmlChar *) value;
 	    } else {
 		text->content = xmlStrdup(value);
@@ -772,7 +774,8 @@ xsltAttrListTemplateProcess(xsltTransformContextPtr ctxt,
 		}
 	    } else if ((ctxt->internalized) &&
 		(target->doc != NULL) &&
-		(target->doc->dict == ctxt->dict))
+		(target->doc->dict == ctxt->dict) &&
+		xmlDictOwns(ctxt->dict, value))
 	    {
 		text->content = (xmlChar *) value;
 	    } else {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]