projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dcc1373
)
Revert "[Tizen] Fix SVACE issue - change sscanf(%d) to strtol"
86/131786/1
author
Jinho, Lee
<jeano.lee@samsung.com>
Tue, 30 May 2017 09:21:32 +0000
(18:21 +0900)
committer
Jinho, Lee
<jeano.lee@samsung.com>
Tue, 30 May 2017 09:21:35 +0000
(18:21 +0900)
This reverts commit
b85d6752041b0b00480e8c2ddaed88696cdb21c5
.
Change-Id: I96cda90e0442842045924d1b7106142261787e04
dali-toolkit/third-party/nanosvg/nanosvg.cc
patch
|
blob
|
history
diff --git
a/dali-toolkit/third-party/nanosvg/nanosvg.cc
b/dali-toolkit/third-party/nanosvg/nanosvg.cc
index
601413c
..
d3ffc40
100644
(file)
--- 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.
/**
* 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 '%3
1s' and use strtol here
+ * To prevent the possible overflow, we replace '%s' with '%3
2s' 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 {
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.
/**
* 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 '%3
1
s' here.
+ * To prevent the possible overflow, we replace '%s' with '%3
2
s' here.
*/
*/
- sscanf(str, "%f%3
1
s", &coord.value, units);
+ sscanf(str, "%f%3
2
s", &coord.value, units);
coord.units = nsvg__parseUnits(units);
return coord;
}
coord.units = nsvg__parseUnits(units);
return coord;
}