mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 22:05:46 +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:
@@ -311,6 +311,7 @@ main(int argc, char *argv[])
|
|||||||
if (lfile == NULL)
|
if (lfile == NULL)
|
||||||
error(1, "unable to open %s", path);
|
error(1, "unable to open %s", path);
|
||||||
cp = NULL;
|
cp = NULL;
|
||||||
|
len = 0;
|
||||||
getline(&cp, &len, lfile); /* log */
|
getline(&cp, &len, lfile); /* log */
|
||||||
getline(&cp, &len, lfile); /* cwd */
|
getline(&cp, &len, lfile); /* cwd */
|
||||||
getline(&cp, &len, lfile); /* command */
|
getline(&cp, &len, lfile); /* command */
|
||||||
|
Reference in New Issue
Block a user