[libxslt] Fix some case of pattern parsing errors
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Fix some case of pattern parsing errors
- Date: Sun, 22 Jan 2012 09:52:42 +0000 (UTC)
commit fe5a4fa33eb85bce3253ed3742b1ea6c4b59b41b
Author: Abhishek Arya <inferno chromium org>
Date: Sun Jan 22 17:47:50 2012 +0800
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
libxslt/pattern.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libxslt/pattern.c b/libxslt/pattern.c
index 6161376..1155b54 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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]