summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2017-09-11 16:08:54 -0700
committerTom Cherry <tomcherry@google.com>2017-09-13 13:11:48 -0700
commit48db85c19ffa7fd54239e405b7d1f9e3c3b2d871 (patch)
tree798dfc043c39cf7142b197c559a54218fc06bb9c /trusty/coverage/coverage.cpp
parentea2e67526d496413f0013253e586e7fad1f9cb93 (diff)
init: fix variable scope issue with ExpandArgs()
ExpandArgs() was factored out of Service::Start() to clean up init, however this introduced a bug: the scope of expanded_args ends when ExpandArgs() returns, yet pointers to the c strings contained within those std::strings are returned from the function. These pointers are invalid and have been seen to cause failures on real devices. This change moves the execv() into ExpandArgs() and renames it ExpandArgsAndExecv() to keep the clean separation of Service::Start() but fix the variable scope issue. Bug: 65303004 Test: boot fugu Change-Id: I612128631f5b58d040bffcbc2220593ad16cd450 (cherry picked from commit 5e405cacb1f3ef2265fcc71dbbf6a39c1e7dc1c1)
Diffstat (limited to 'trusty/coverage/coverage.cpp')
0 files changed, 0 insertions, 0 deletions