Fix for potential buffer override in nsvg__parseElement()
This commit is contained in:
parent
b3f906a393
commit
95daad571d
@ -177,7 +177,7 @@ static void nsvg__parseElement(char* s,
|
|||||||
if (*s) { *s++ = '\0'; }
|
if (*s) { *s++ = '\0'; }
|
||||||
|
|
||||||
// Get attribs
|
// Get attribs
|
||||||
while (!end && *s && nattr < NSVG_XML_MAX_ATTRIBS-1) {
|
while (!end && *s && nattr < NSVG_XML_MAX_ATTRIBS-3) {
|
||||||
// Skip white space before the attrib name
|
// Skip white space before the attrib name
|
||||||
while (*s && nsvg__isspace(*s)) s++;
|
while (*s && nsvg__isspace(*s)) s++;
|
||||||
if (!*s) break;
|
if (!*s) break;
|
||||||
|
Loading…
Reference in New Issue
Block a user