Change-Id: I89d0e386dd3caec1ded02325a3886cbec48c2a7b
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
{
NSVGcoordinate coord = {0, NSVG_UNITS_USER};
char units[32]="";
- sscanf(str, "%f%s", &coord.value, units);
+
+ /**
+ * In the original file, the formatted data reading did not specify the string with width limitation.
+ * To prevent the possible overflow, we replace '%s' with '%32s' here.
+ */
+ sscanf(str, "%f%32s", &coord.value, units);
coord.units = nsvg__parseUnits(units);
return coord;
}