diff options
author | Alastair Poole <netstar@gmail.com> | 2021-09-07 08:14:26 +0100 |
---|---|---|
committer | Alastair Poole <netstar@gmail.com> | 2021-09-07 08:15:08 +0100 |
commit | 79a15be29495241da520ee4242c9cab5dd1d732c (patch) | |
tree | 10c0ff23d134bd8b333e6037fd172b3cdbb353a5 | |
parent | 5d3f6ad5946c52030708c9bfa4b596ed211dcc3f (diff) | |
download | enlightenment-79a15be29495241da520ee4242c9cab5dd1d732c.tar.gz |
procstats: check null return / ptr.
-rw-r--r-- | src/modules/procstats/process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/procstats/process.c b/src/modules/procstats/process.c index c237d103a0..5e534eb750 100644 --- a/src/modules/procstats/process.c +++ b/src/modules/procstats/process.c @@ -203,11 +203,11 @@ _cmd_args(Proc_Info *p, char *name, size_t len) snprintf(name, len, "%s", ecore_file_file_get(line)); n = line; - while (*n && (*n + 1)) + while ((n) && (*n) && (*n + 1)) { eina_strbuf_append(buf, n); n = strchr(n, '\0') + 1; - if (*n && (*n + 1)) eina_strbuf_append(buf, " "); + if ((n) && (*n) && (*n + 1)) eina_strbuf_append(buf, " "); } p->arguments = eina_strbuf_release(buf); } |