Check buffer length in parseCoordinateRaw

This commit is contained in:
djack1010 2017-04-22 23:41:19 +02:00
parent b20e2eb968
commit 4310325aba

View File

@ -1388,7 +1388,7 @@ static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str)
{
NSVGcoordinate coord = {0, NSVG_UNITS_USER};
char units[32]="";
sscanf(str, "%f%s", &coord.value, units);
sscanf(str, "%f%31s", &coord.value, units);
coord.units = nsvg__parseUnits(units);
return coord;
}