]> granicus.if.org Git - procps-ng/commitdiff
last bits
authoralbert <>
Sat, 21 Dec 2002 14:13:33 +0000 (14:13 +0000)
committeralbert <>
Sat, 21 Dec 2002 14:13:33 +0000 (14:13 +0000)
NEWS
pgrep.c
top.c

diff --git a/NEWS b/NEWS
index c284abcd075361408cec877bdeac7c3c266cd2d3..4db71ac469f67cb9066af699507b86418ed688e2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@ procps-3.1.4 --> procps-3.1.5
 
 ancient (2.x.xx era) data corruption fixed
 serious hidden-process problem (3.1.3+) fixed
-escape sequence vulnerability fixed
+w: escape sequence vulnerability fixed
 
 procps-3.1.3 --> procps-3.1.4
 
diff --git a/pgrep.c b/pgrep.c
index 6ebbada51e6c85adc56102833ba205ef125e7ea7..8ba1c65b59208091712c917fb5703994324f55b3 100644 (file)
--- a/pgrep.c
+++ b/pgrep.c
@@ -273,6 +273,7 @@ output_numlist (const union el *restrict list)
 static void
 output_strlist (const union el *restrict list)
 {
+// FIXME: escape codes
        int i;
        for (i = 1; i < list[0].num; i++)
                printf ("%s%s", list[i].str, opt_delim);
@@ -447,7 +448,7 @@ select_procs (void)
                                matches = 0;
                        }
                        if (opt_long) {
-                               char buff[4096];
+                               char buff[5096];  // FIXME
                                sprintf (buff, "%d %s", task.pid, cmd);
                                list[++matches].str = strdup (buff);
                        } else {
diff --git a/top.c b/top.c
index b49e9a568bf99b8fa95e9a7057a277a4a7105af1..f19fee3eb154972529e9d2068da64f8a82aaf389 100644 (file)
--- a/top.c
+++ b/top.c
@@ -2892,29 +2892,6 @@ static void task_show (const WIN_t *q, const proc_t *p)
       unsigned    w = Fieldstab[i].width;
 
       switch (i) {
-#if 0
-         case P_CMD:
-         {  const char *cp;
-            if (CHKw(q, Show_CMDLIN)) {
-               char tmp[ROWBUFSIZ];
-               char *tp;
-               if (p->cmdline) {
-                  j = 0;
-                  *(tp = tmp) = '\0';
-                  do {
-                     tp = scat(tp, fmtmk("%.*s ", q->maxcmdln, p->cmdline[j]));
-                     if (q->maxcmdln < (tp - tmp)) break;
-                  } while (p->cmdline[++j]);
-                  strim_1(tmp);
-               } else
-                  strcpy(tmp, fmtmk("[%s]", p->cmd));
-               cp = tmp;
-            } else
-               cp = p->cmd;
-            MKCOL(q->maxcmdln, q->maxcmdln, cp);
-         }
-            break;
-#endif
          case P_CMD:
          {  char tmp[ROWBUFSIZ];
             unsigned flags;