2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 13:58:05 +00:00

Some getline() implementations (FreeBSD 8.0) do not ignore the

length pointer when the line pointer is NULL as they should.
This commit is contained in:
Todd C. Miller 2010-07-27 10:48:35 -04:00
parent c33bf93509
commit 5d06ad3b6b

View File

@ -311,6 +311,7 @@ main(int argc, char *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 */