mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
loader/svg: Fix invalid syntax check
If the key is not parsed and the '=' keyword is located next, modify it to parse the following syntax. related issue: https://github.com/thorvg/thorvg/issues/2116
This commit is contained in:
parent
ab49e2ee2b
commit
a4ced1963e
1 changed files with 4 additions and 1 deletions
|
@ -314,7 +314,10 @@ bool simpleXmlParseAttributes(const char* buf, unsigned bufLength, simpleXMLAttr
|
|||
if ((*keyEnd == '=') || (isspace((unsigned char)*keyEnd))) break;
|
||||
}
|
||||
if (keyEnd == itrEnd) goto error;
|
||||
if (keyEnd == key) continue;
|
||||
if (keyEnd == key) { // There is no key. This case is invalid, but explores the following syntax.
|
||||
itr = keyEnd + 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (*keyEnd == '=') value = keyEnd + 1;
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue