From e051535686f848341ab9f89752df31baee3a9909 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Fri, 1 Jun 2018 00:00:00 -0500 Subject: [PATCH] library: adapt for increased (cmd) program name length In the new library 'cmd' is dynamically allocated just like 'cmdline'. This will align us with the ref below. Reference(s): . master branch increase to 64 commit 2cfdbbe897f0d4e41460c7c2b92acfc5804652c8 Signed-off-by: Jim Warner --- proc/readproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proc/readproc.c b/proc/readproc.c index bd87bb44..4a8d6bb1 100644 --- a/proc/readproc.c +++ b/proc/readproc.c @@ -268,7 +268,7 @@ ENTER(0x220); #endif case_Name: - { char buf[16]; + { char buf[64]; unsigned u = 0; while(u < sizeof(buf) - 1u){ int c = *S++; @@ -283,7 +283,7 @@ ENTER(0x220); buf[u++] = c; } buf[u] = '\0'; - if (!P->cmd && !(P->cmd = strndup(buf, 15))) + if (!P->cmd && !(P->cmd = strdup(buf))) return 1; S--; // put back the '\n' or '\0' continue;