netstar pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=79a15be29495241da520ee4242c9cab5dd1d732c

commit 79a15be29495241da520ee4242c9cab5dd1d732c
Author: Alastair Poole <nets...@gmail.com>
Date:   Tue Sep 7 08:14:26 2021 +0100

    procstats: check null return / ptr.
---
 src/modules/procstats/process.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/procstats/process.c b/src/modules/procstats/process.c
index c237d103a..5e534eb75 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);
           }

-- 


Reply via email to