From e9517d8c4a08b28e51ec847946630dc56823b6bc Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Sat, 11 Feb 2006 12:14:10 +0000 Subject: [PATCH] fix xsltSaveResultToString comment detect loops when computing variables, * libxslt/xsltutils.c: fix xsltSaveResultToString comment * libxslt/transform.c: detect loops when computing variables, should fix bug #330772 * doc/xsltproc.xml doc/xsltproc.1: fix typo in man page * tests/namespaces/tst7.out tests/general/bug-152.out: small output changes due to libxml2 xhtml meta handling modification Daniel --- ChangeLog | 9 +++++++++ doc/xsltproc.1 | 2 +- doc/xsltproc.xml | 2 +- libxslt/transform.c | 3 ++- libxslt/xsltutils.c | 4 ++-- tests/general/bug-152.out | 3 ++- tests/namespaces/tst7.out | 3 ++- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1203ccdd..97e342f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Sat Feb 11 13:10:01 CET 2006 Daniel Veillard + + * libxslt/xsltutils.c: fix xsltSaveResultToString comment + * libxslt/transform.c: detect loops when computing variables, should + fix bug #330772 + * doc/xsltproc.xml doc/xsltproc.1: fix typo in man page + * tests/namespaces/tst7.out tests/general/bug-152.out: small output + changes due to libxml2 xhtml meta handling modification + Mon Nov 21 12:22:21 CET 2005 Daniel Veillard * libexslt/date.c: Albert Chin found another signed/unsigned problem diff --git a/doc/xsltproc.1 b/doc/xsltproc.1 index 460bcc17..7830802b 100644 --- a/doc/xsltproc.1 +++ b/doc/xsltproc.1 @@ -98,7 +98,7 @@ Do not use the Internet to fetch DTD's, entities or documents\&. .TP \fB\-\-path\fR \fIpaths\fR -Use the list (separated by space or column) of filesystem paths specified by \fIpaths\fR to load DTDs, entities or documents\&. +Use the list (separated by space or colon) of filesystem paths specified by \fIpaths\fR to load DTDs, entities or documents\&. .TP \fB\-\-load\-trace\fR diff --git a/doc/xsltproc.xml b/doc/xsltproc.xml index f7595067..3102ac25 100644 --- a/doc/xsltproc.xml +++ b/doc/xsltproc.xml @@ -250,7 +250,7 @@ paths - Use the list (separated by space or column) of filesystem paths + Use the list (separated by space or colon) of filesystem paths specified by paths to load DTDs, entities or documents. diff --git a/libxslt/transform.c b/libxslt/transform.c index 5bd4d40c..b9f7538b 100644 --- a/libxslt/transform.c +++ b/libxslt/transform.c @@ -1554,7 +1554,8 @@ xsltApplyOneTemplateInt(xsltTransformContextPtr ctxt, xmlNodePtr node, return; CHECK_STOPPED; - if (ctxt->templNr >= xsltMaxDepth) { + if ((ctxt->templNr >= xsltMaxDepth) || + (ctxt->varsNr >= 5 * xsltMaxDepth)) { xsltTransformError(ctxt, NULL, list, "xsltApplyOneTemplate: loop found ???\n"); xsltGenericError(xsltGenericErrorContext, diff --git a/libxslt/xsltutils.c b/libxslt/xsltutils.c index af762f73..78f30cd6 100644 --- a/libxslt/xsltutils.c +++ b/libxslt/xsltutils.c @@ -1544,9 +1544,9 @@ xsltSaveResultToFd(int fd, xmlDocPtr result, xsltStylesheetPtr style) { * @style: the stylesheet * * Save the result @result obtained by applying the @style stylesheet - * to a file or @URL + * to a new allocated string. * - * Returns the number of byte written or -1 in case of failure. + * Returns 0 in case of success and -1 in case of error */ int xsltSaveResultToString(xmlChar **doc_txt_ptr, int * doc_txt_len, diff --git a/tests/general/bug-152.out b/tests/general/bug-152.out index 3d23ac9e..7bdd3377 100644 --- a/tests/general/bug-152.out +++ b/tests/general/bug-152.out @@ -1,7 +1,8 @@ - + + diff --git a/tests/namespaces/tst7.out b/tests/namespaces/tst7.out index 47cc1e7a..b86f605e 100644 --- a/tests/namespaces/tst7.out +++ b/tests/namespaces/tst7.out @@ -1,7 +1,8 @@ - + + A title