Revert "[Tizen] Fix SVACE issue - change sscanf(%d) to strtol" 84/134884/1
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 20 Jun 2017 07:50:57 +0000 (16:50 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 20 Jun 2017 07:51:01 +0000 (16:51 +0900)
This reverts commit eb4bb5f26b2e03eb7a66bbccedb93c78e92a5b03.

Change-Id: I1ec196378764e1728d34793aa25322a5051b1035

dali-toolkit/devel-api/controls/control-devel.h [changed mode: 0755->0644]
dali-toolkit/third-party/nanosvg/nanosvg.cc

old mode 100755 (executable)
new mode 100644 (file)
index 601413c..d3ffc40 100644 (file)
@@ -1038,15 +1038,9 @@ static unsigned int nsvg__parseColorRGB(const char* str)
 
     /**
      * 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 '%31s' and use strtol here
+     * To prevent the possible overflow, we replace '%s' with '%32s' here.
      */
-    char* end;
-    r = strtol(str + 4, &end, 10);
-    sscanf(end, "%31[%%, \t]", s1);
-    g = strtol(end + strlen(s1), &end, 10);
-    sscanf(end, "%31[%%, \t]", s2);
-    b = strtol(end + strlen(s2), &end, 10);
-
+    sscanf(str + 4, "%d%32[%%, \t]%d%32[%%, \t]%d", &r, s1, &g, s2, &b);
     if (strchr(s1, '%')) {
         return NSVG_RGB((r*255)/100,(g*255)/100,(b*255)/100);
     } else {
@@ -1275,9 +1269,9 @@ static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str)
 
     /**
      * 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 '%31s' here.
+     * To prevent the possible overflow, we replace '%s' with '%32s' here.
      */
-    sscanf(str, "%f%31s", &coord.value, units);
+    sscanf(str, "%f%32s", &coord.value, units);
     coord.units = nsvg__parseUnits(units);
     return coord;
 }