From 5d06ad3b6b779ade94f7a916ff1ce2ad14b873a1 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 27 Jul 2010 10:48:35 -0400 Subject: [PATCH] Some getline() implementations (FreeBSD 8.0) do not ignore the length pointer when the line pointer is NULL as they should. --- plugins/sudoers/sudoreplay.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/sudoers/sudoreplay.c b/plugins/sudoers/sudoreplay.c index d7b152dd2..bf416a601 100644 --- a/plugins/sudoers/sudoreplay.c +++ b/plugins/sudoers/sudoreplay.c @@ -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 */