mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 18:08:53 +00:00
Replace linux cmdline tokens with spaces
This commit is contained in:
parent
76597aa25f
commit
b890670be1
@ -2,8 +2,6 @@
|
||||
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <streambuf>
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -51,6 +49,11 @@ std::string proc_cmdline(const proc_t* proc_info) {
|
||||
if (fd) {
|
||||
result = std::string(std::istreambuf_iterator<char>(fd),
|
||||
std::istreambuf_iterator<char>());
|
||||
std::replace_if(
|
||||
result.begin(),
|
||||
result.end(),
|
||||
[](const char& c) { return c == 0; },
|
||||
' ');
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user