From d074b58a3b51afa5dd5620272ffe796cd7d9d1c0 Mon Sep 17 00:00:00 2001 From: "William M. Brack" Date: Fri, 21 Nov 2003 10:21:30 +0000 Subject: [PATCH] small further enhancement, bug #127450 * libxslt/keys.c: small further enhancement, bug #127450 --- ChangeLog | 4 ++++ libxslt/keys.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f8ef75e..4a95cd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Nov 21 18:17:32 HKT 2003 William Brack + + * libxslt/keys.c: small further enhancement, bug #127450 + Thu Nov 20 17:26:57 CET 2003 Daniel Veillard * libxslt/keys.c: another problem reported by Oleg Paraschenko diff --git a/libxslt/keys.c b/libxslt/keys.c index 27452a3..008b379 100644 --- a/libxslt/keys.c +++ b/libxslt/keys.c @@ -260,10 +260,12 @@ skipPredicate(const xmlChar *cur, int end) { end = skipString(cur, end); if (end <= 0) return(-1); + continue; } else if (cur[end] == '[') { end = skipPredicate(cur, end); if (end <= 0) return(-1); + continue; } else if (cur[end] == ']') return(end + 1); end++; @@ -317,10 +319,13 @@ xsltAddKey(xsltStylesheetPtr style, const xmlChar *name, while ((match[end] != 0) && (match[end] != '|')) { if (match[end] == '[') { end = skipPredicate(match, end); - if (end <= 0) + if (end <= 0) { xsltTransformError(NULL, style, inst, "key pattern is malformed: %s", key->match); + if (style != NULL) style->errors++; + goto error; + } } else end++; } -- 2.7.4