mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 01:55:20 +00:00
string::length instead of strlen
This commit is contained in:
parent
5863fb2948
commit
a5edef6782
@ -83,7 +83,7 @@ QueryData genProcesses() {
|
||||
|
||||
// process name
|
||||
char name[1024];
|
||||
memset(name, 0, 1024);
|
||||
memset(name, 0, sizeof(name));
|
||||
proc_name(pid, name, sizeof(name));
|
||||
r["name"] = std::string(name);
|
||||
|
||||
@ -96,7 +96,7 @@ QueryData genProcesses() {
|
||||
memset(path, 0, sizeof(path));
|
||||
proc_pidpath(pid, path, sizeof(path));
|
||||
r["path"] = std::string(path);
|
||||
if (strlen(path) > 0) {
|
||||
if ((r["path"]).length() > 0) {
|
||||
if (!boost::filesystem::exists(r["path"])) {
|
||||
r["on_disk"] = "0";
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user