Fix uses-after-free

The code was previously taking the address of the device_name
string and passing it to execve (via an argument vector passed to
logwrap_fork_execvp) after device_name goes out of scope. Moreover,
the code for adding the length argument pushed the address of a
temporary to the vector. Fix it by having the code create a vector of
std::string for the arguments and only creating the vector of const
char * before calling logwrap_fork_execvp.

Bug: 376533537
Change-Id: Ic066cd9a1d3be5a1a7e6ad997f81166c039bbcaf
1 file changed