From: William M. Brack Date: Thu, 14 Jul 2005 05:52:20 +0000 (+0000) Subject: added check in xsltCopyText to assure content is in dictionary before X-Git-Tag: v1.1.28~293 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55379ef26269ac25921c441cda2dc82372eeacd7;p=platform%2Fupstream%2Flibxslt.git added check in xsltCopyText to assure content is in dictionary before * libxslt/transform.c: added check in xsltCopyText to assure content is in dictionary before doing a straight copy of content (bug 302821) --- diff --git a/ChangeLog b/ChangeLog index 5c654e1..10e116c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Jul 13 22:41:03 PDT 2005 William Brack + + * libxslt/transform.c: added check in xsltCopyText to assure + content is in dictionary before doing a straight copy of + content (bug 302821) + Tue Jul 13 16:16:31 PDT 2005 William Brack * libxslt/transform.c: fixed to set current default value for diff --git a/libxslt/transform.c b/libxslt/transform.c index 38618d1..b56bdef 100644 --- a/libxslt/transform.c +++ b/libxslt/transform.c @@ -730,7 +730,16 @@ xsltCopyText(xsltTransformContextPtr ctxt, xmlNodePtr target, return NULL; if (cur->name == xmlStringTextNoenc) copy->name = xmlStringTextNoenc; - copy->content = cur->content; + /* + * Must confirm that content is in dict + * (bug 302821) + */ + if (xmlDictOwns(ctxt->dict, cur->content)) + copy->content = cur->content; + else { + if ((copy->content = xmlStrdup(cur->content)) == NULL) + return NULL; + } } else { /* * normal processing. keep counters to extend the text node