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:
Mira Grudzinska 2022-01-17 22:32:19 +01:00 committed by Hermet Park
parent 024594f3bb
commit c351391bd5

View file

@ -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';