Commit 71691d7b authored by Daniel Veillard's avatar Daniel Veillard

Check name vales for attribute-set elements

For https://bugzilla.gnome.org/show_bug.cgi?id=751633

It has to be a qname and we didn't check for empty strings,
this could raise an infinite loop at compilation too
parent d20a5ab0
......@@ -297,9 +297,11 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
return;
value = xmlGetNsProp(cur, (const xmlChar *)"name", NULL);
if (value == NULL) {
if ((value == NULL) || (*value == 0)) {
xsltGenericError(xsltGenericErrorContext,
"xsl:attribute-set : name is missing\n");
if (value)
xmlFree(value);
return;
}
......@@ -495,6 +497,8 @@ xsltResolveSASCallback(xsltAttrElemPtr values, xsltStylesheetPtr style,
xsltAttrElemPtr refs;
tmp = values;
if ((name == NULL) || (name[0] == 0))
return;
while (tmp != NULL) {
if (tmp->set != NULL) {
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment