diff options
Diffstat (limited to 'source/a/procps-ng/procps-ng.pgrep.CMDSTRSIZE.diff')
-rw-r--r-- | source/a/procps-ng/procps-ng.pgrep.CMDSTRSIZE.diff | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/a/procps-ng/procps-ng.pgrep.CMDSTRSIZE.diff b/source/a/procps-ng/procps-ng.pgrep.CMDSTRSIZE.diff new file mode 100644 index 000000000..4ff321d0d --- /dev/null +++ b/source/a/procps-ng/procps-ng.pgrep.CMDSTRSIZE.diff @@ -0,0 +1,20 @@ +--- ./pgrep.c.orig 2019-10-27 06:32:58.339230954 -0500 ++++ ./pgrep.c 2019-12-21 13:38:57.229656940 -0600 +@@ -42,6 +42,8 @@ + #define EXIT_FATAL 3 + #define XALLOC_EXIT_CODE EXIT_FATAL + ++#define CMDSTRSIZE 4096 ++ + #include "c.h" + #include "fileutils.h" + #include "nsutils.h" +@@ -497,7 +499,7 @@ + regex_t *preg; + pid_t myself = getpid(); + struct el *list = NULL; +- long cmdlen = sysconf(_SC_ARG_MAX) * sizeof(char); ++ long cmdlen = CMDSTRSIZE; + char *cmdline = xmalloc(cmdlen); + char *cmdsearch = xmalloc(cmdlen); + char *cmdoutput = xmalloc(cmdlen); |