When copying tagName, if length of referenced string is longer
than general case, it is not used as tagName.
Change-Id: I205b4eb58f97a75bed43caafe55de8f56e6700d4
sz = attrs - content;
attrsLength = length - sz;
while ((sz > 0) && (isspace(content[sz - 1]))) sz--;
+ if ((unsigned int)sz > sizeof(tagName)) return;
strncpy(tagName, content, sz);
tagName[sz] = '\0';
}
sz = attrs - content;
attrsLength = length - sz;
while ((sz > 0) && (isspace(content[sz - 1]))) sz--;
+ if ((unsigned int)sz > sizeof(tagName)) return false;
strncpy(tagName, content, sz);
tagName[sz] = '\0';
}