From 96a6656a0330918e7dc06cfb2756bf1373f64509 Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Tue, 13 Jun 2017 11:06:50 +0900 Subject: [PATCH] Revert "[Tizen] Fix SVACE issue - change sscanf(%d) to strtol" This reverts commit 9890eb95dff1675153e3b7818f2623d9f2702fc7. Change-Id: Iceb70822399f404a4d291fa5e61d28c08f14ed1e --- dali-toolkit/devel-api/controls/control-devel.h | 0 dali-toolkit/third-party/nanosvg/nanosvg.cc | 14 ++++---------- 2 files changed, 4 insertions(+), 10 deletions(-) mode change 100755 => 100644 dali-toolkit/devel-api/controls/control-devel.h diff --git a/dali-toolkit/devel-api/controls/control-devel.h b/dali-toolkit/devel-api/controls/control-devel.h old mode 100755 new mode 100644 diff --git a/dali-toolkit/third-party/nanosvg/nanosvg.cc b/dali-toolkit/third-party/nanosvg/nanosvg.cc index 601413c..d3ffc40 100644 --- a/dali-toolkit/third-party/nanosvg/nanosvg.cc +++ b/dali-toolkit/third-party/nanosvg/nanosvg.cc @@ -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; } -- 2.7.4