From: Todd C. Miller Date: Tue, 27 Jul 2010 14:47:55 +0000 (-0400) Subject: Some getline() implementations (FreeBSD 8.0) do not ignore the X-Git-Tag: SUDO_1_7_4~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb938f1d9ff0d908100270584c0758495363f48d;p=sudo Some getline() implementations (FreeBSD 8.0) do not ignore the length pointer when the line pointer is NULL as they should. --HG-- branch : 1.7 --- diff --git a/sudoreplay.c b/sudoreplay.c index 2aa676860..58b8639d7 100644 --- a/sudoreplay.c +++ b/sudoreplay.c @@ -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 */