Browse Source

Fix for potential buffer override in nsvg__parseElement()

pull/8/head
Mikko Mononen 9 years ago
parent
commit
95daad571d
  1. 2
      src/nanosvg.h

2
src/nanosvg.h

@ -177,7 +177,7 @@ static void nsvg__parseElement(char* s,
if (*s) { *s++ = '\0'; }
// 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
while (*s && nsvg__isspace(*s)) s++;
if (!*s) break;

Loading…
Cancel
Save