summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Arya <inferno@chromium.org>2012-01-22 17:47:50 +0800
committerDaniel Veillard <veillard@redhat.com>2012-01-22 17:47:50 +0800
commitfe5a4fa33eb85bce3253ed3742b1ea6c4b59b41b (patch)
treed40f3c87e7a11574fa8848f0db1f96ae50d4630b
parentddfa98a88cce1195c05809e5c184d8697e71852d (diff)
downloadlibxslt-fe5a4fa33eb85bce3253ed3742b1ea6c4b59b41b.tar.gz
libxslt-fe5a4fa33eb85bce3253ed3742b1ea6c4b59b41b.tar.bz2
libxslt-fe5a4fa33eb85bce3253ed3742b1ea6c4b59b41b.zip
Fix some case of pattern parsing errors
We could accidentally hit an off by one string array access due to improper loop exit when parsing patterns
-rw-r--r--libxslt/pattern.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libxslt/pattern.c b/libxslt/pattern.c
index 6161376e..1155b546 100644
--- a/libxslt/pattern.c
+++ b/libxslt/pattern.c
@@ -1867,6 +1867,8 @@ xsltCompilePatternInternal(const xmlChar *pattern, xmlDocPtr doc,
while ((pattern[end] != 0) && (pattern[end] != '"'))
end++;
}
+ if (pattern[end] == 0)
+ break;
end++;
}
if (current == end) {