Author: Robie Basak <robie.basak@ubuntu.com>
Description: increase line length limit of ps output
 If there exist processes with long command lines, then the parser tries to
 parse the following line from the middle of the previous line. We hit this in
 Ubuntu autopkgtest infrastructure because the command line to call the
 autopkgtest command is particularly long. For now, just increase the buffer
 size.
Bug: https://github.com/YJesus/Unhide/issues/11
Bug-Ubuntu: https://launchpad.net/bugs/2062269
Last-Update: 2024-04-18

--- a/unhide-linux-compound.c
+++ b/unhide-linux-compound.c
@@ -228,7 +228,7 @@
    int found_killafter = 0;
    FILE *fich_tmp;
    char command[50];
-   char read_line[1024];
+   char read_line[10240];
    char lwp[7];
    int  index;
    char directory[100];
@@ -257,22 +257,22 @@
 
    strcpy(directory,"/proc/");
 
-   while (NULL != fgets(read_line, 1024, fich_tmp)) 
+   while (NULL != fgets(read_line, 10240, fich_tmp)) 
    {
       char* curline = read_line;
 
-      read_line[1023] = 0;
+      read_line[10239] = 0;
       read_line[strlen(read_line)-1] = 0;
 
 //    printf("read_line = %s\n", read_line);   // DEBUG
-      while( *curline == ' ' && curline <= read_line+1023) 
+      while( *curline == ' ' && curline <= read_line+10239) 
       {
          curline++;
       }
 
       // get LWP
       index=0;
-      while( isdigit(*curline) && curline <= read_line+1023) 
+      while( isdigit(*curline) && curline <= read_line+10239) 
       {
          lwp[index++] = *curline;
          curline++;
