projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef591bb
)
[SVACE] Resolves out of range exception
22/198622/1
author
d.saraswat
<d.saraswat@samsung.com>
Mon, 28 Jan 2019 06:43:58 +0000
(12:13 +0530)
committer
d.saraswat
<d.saraswat@samsung.com>
Mon, 28 Jan 2019 06:43:58 +0000
(12:13 +0530)
Applied extra check on index of substring so that
it lies within size of string.
Change-Id: I9dd8f079e24aed911e71a8b2b7e4e69d69a17c96
Signed-off-by: d.saraswat <d.saraswat@samsung.com>
common/profiler.cc
patch
|
blob
|
history
diff --git
a/common/profiler.cc
b/common/profiler.cc
index
a71e797
..
8426adc
100644
(file)
--- a/
common/profiler.cc
+++ b/
common/profiler.cc
@@
-52,7
+52,7
@@
ScopeProfile::ScopeProfile(const char* step, const bool isStep)
// Remove return type and parameter info from __PRETTY_FUNCTION__
int se = step_.find_first_of('(');
int ss = step_.find_last_of(' ', se) + 1;
- if (
ss < se
) {
+ if (
(ss < se) && ((se-ss) < strlen(step_.c_str()))
) {
step_ = step_.substr(ss, se - ss);
}
}