summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage_test.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-11 16:08:54 -0700
commit5e405cacb1f3ef2265fcc71dbbf6a39c1e7dc1c1 (patch)
tree789a2e1b77570b4beb58fa08f3c32c144e51ba1b /trusty/coverage/coverage_test.cpp
parentf899548cdb18a56db9ad0c0c5ecd1941a6b23255 (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
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions