summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/libxslt/libxslt/imports.c
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-05-26 12:14:36 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-05-26 13:53:47 +0000
commit168cc2b83c53e4e68bf89b331d92da88a99d2bf3 (patch)
treed34a0d1e8e14dec81e1abb64b4c2cbe82fbbf63b /chromium/third_party/libxslt/libxslt/imports.c
parente5cd5a93ad3c127610e3f3279189174386c2e9ec (diff)
[Backport] Roll libxslt to 891681e3e948f31732229f53cb6db7215f740fc7v5.7.0
BUG=583156,583171 Review URL: https://codereview.chromium.org/1853083002 (CVE-2016-1683, CVE-2016-1684) Change-Id: Ibe46ea160550fc72af08b280998ee00ba29be42e Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'chromium/third_party/libxslt/libxslt/imports.c')
-rw-r--r--chromium/third_party/libxslt/libxslt/imports.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/chromium/third_party/libxslt/libxslt/imports.c b/chromium/third_party/libxslt/libxslt/imports.c
index 9277b4f64fd..7262aab9541 100644
--- a/chromium/third_party/libxslt/libxslt/imports.c
+++ b/chromium/third_party/libxslt/libxslt/imports.c
@@ -400,17 +400,12 @@ xsltFindTemplate(xsltTransformContextPtr ctxt, const xmlChar *name,
return(NULL);
style = ctxt->style;
while (style != NULL) {
- cur = style->templates;
- while (cur != NULL) {
- if (xmlStrEqual(name, cur->name)) {
- if (((nameURI == NULL) && (cur->nameURI == NULL)) ||
- ((nameURI != NULL) && (cur->nameURI != NULL) &&
- (xmlStrEqual(nameURI, cur->nameURI)))) {
- return(cur);
- }
- }
- cur = cur->next;
- }
+ if (style->namedTemplates != NULL) {
+ cur = (xsltTemplatePtr)
+ xmlHashLookup2(style->namedTemplates, name, nameURI);
+ if (cur != NULL)
+ return(cur);
+ }
style = xsltNextImport(style);
}