mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 14:41:50 +00:00
svg_loader: additional check while style parsing
This check is needed so the function can be used to parse not only the inline styles, but also the css internal style sheet.
This commit is contained in:
parent
024594f3bb
commit
c351391bd5
1 changed files with 7 additions and 0 deletions
|
@ -468,6 +468,13 @@ bool simpleXmlParseW3CAttribute(const char* buf, TVG_UNUSED unsigned buflen, sim
|
|||
do {
|
||||
char* sep = (char*)strchr(buf, ':');
|
||||
next = (char*)strchr(buf, ';');
|
||||
if (sep >= end)
|
||||
{
|
||||
next = nullptr;
|
||||
sep = nullptr;
|
||||
}
|
||||
if (next >= end) next = nullptr;
|
||||
|
||||
|
||||
key[0] = '\0';
|
||||
val[0] = '\0';
|
||||
|
|
Loading…
Add table
Reference in a new issue