Fix a krsh bug introduced in r21001 which could cause garbage at the
authorGreg Hudson <ghudson@mit.edu>
Mon, 10 Nov 2008 18:45:17 +0000 (18:45 +0000)
committerGreg Hudson <ghudson@mit.edu>
Mon, 10 Nov 2008 18:45:17 +0000 (18:45 +0000)
beginning of the command string.

ticket: 6200
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21065 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/bsd/krsh.c

index 6441891ee0f1e8ad89c13dbd3c7d49db6c7a181f..ac92057a45dc9139bcc529ff3f5f893377745961 100644 (file)
@@ -321,6 +321,7 @@ main(argc, argv0)
     if (encrypt_flag)
       cc += 3;
     args = (char *) malloc((unsigned) cc);
+    *args = '\0';
     if (encrypt_flag)
       strlcpy(args, "-x ", cc);
     for (ap = argv; *ap; ap++) {