]> granicus.if.org Git - sudo/commitdiff
Some getline() implementations (FreeBSD 8.0) do not ignore the
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 27 Jul 2010 14:47:55 +0000 (10:47 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 27 Jul 2010 14:47:55 +0000 (10:47 -0400)
length pointer when the line pointer is NULL as they should.

--HG--
branch : 1.7

sudoreplay.c

index 2aa6768609ccad3257433f1a124b3557ad9bc174..58b8639d7a1b641e02fd285670621805832cf880 100644 (file)
@@ -315,6 +315,7 @@ main(argc, argv)
     if (lfile == NULL)
        error(1, "unable to open %s", path);
     cp = NULL;
+    len = 0;
     getline(&cp, &len, lfile); /* log */
     getline(&cp, &len, lfile); /* cwd */
     getline(&cp, &len, lfile); /* command */