procps-ng/procps-ng-3.3.15-ps-select.patch

40 lines
1012 B
Diff

From 06995518605fed7a1a29551be0eff01b2f9e89b7 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 13 Dec 2022 16:02:50 -0500
Subject: [PATCH]
---
ps/common.h | 2 +-
ps/select.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ps/common.h b/ps/common.h
index 905d320..fc4d3a8 100644
--- a/ps/common.h
+++ b/ps/common.h
@@ -189,7 +189,7 @@ typedef union sel_union {
uid_t uid;
gid_t gid;
dev_t tty;
- char cmd[64]; /* this is _not_ \0 terminated */
+ char cmd[16]; /* this is _not_ \0 terminated */
} sel_union;
typedef struct selection_node {
diff --git a/ps/select.c b/ps/select.c
index f58ca25..e12982d 100644
--- a/ps/select.c
+++ b/ps/select.c
@@ -117,7 +117,7 @@ static int proc_was_listed(proc_t *buf){
break; case SEL_SESS: return_if_match(session,pid);
break; case SEL_COMM: i=sn->n; while(i--)
- if(!strncmp( buf->cmd, (*(sn->u+i)).cmd, 63 )) return 1;
+ if(!strncmp( buf->cmd, (*(sn->u+i)).cmd, 15 )) return 1;
--
2.31.1