Here's the fix for the runttys segfaulting.  It was an off by one
error in allocating space to hold an argv vector during construction
of the string for the terminal used.


runttys.c:
2001-11-21  Ryan M Golbeck <[EMAIL PROTECTED]>

    * runttys.c (setup_terminal): Fixed off by one error internal 
    function make_args.


Index: runttys.c
===================================================================
RCS file: /cvsroot/hurd/hurd/daemons/runttys.c,v
retrieving revision 1.3
diff -u -p -r1.3 runttys.c
--- runttys.c   1999/09/19 19:43:31     1.3
+++ runttys.c   2001/11/22 03:36:10
@@ -92,7 +92,7 @@ setup_terminal (struct terminal *t, stru
          size_t len;
          argz_create_sep (line, ' ', &argz, &len);
          argc = argz_count (argz, len);
-         argv = malloc (argc * sizeof (char *));
+         argv = malloc ((argc + 1) * sizeof (char *));
          argz_extract (argz, len, argv);
          return argv;
        }

-- 
Ryan Golbeck <[EMAIL PROTECTED]>
Computer Science
University Of Waterloo

GPG: 1024D/78916B84 
1B1B 2A87 3F00 A7FB 40F3  526D 36CF BA44 7891 6B84

Attachment: msg02020/pgp00000.pgp
Description: PGP signature

Reply via email to