From 86ef4a30baf0c325b20cff8b2867b14e45683e61 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Fri, 15 Nov 1996 17:36:20 +0000 Subject: pw_scan() was being used to convert a string into a struct passwd, with an auto stack variable that was about to disappear. It broke with some nis passwd changes because of a gethostbyname() call that uses a fair bit of stack.. This was a timebomb waiting to go off at any time and could have been causing subtle corruption for a while. AARGH!! This is HIGHLY reccomended for 2.2 and presumably 2.1.6 --- chpass/edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chpass/edit.c') diff --git a/chpass/edit.c b/chpass/edit.c index cf87fdf..40119f0 100644 --- a/chpass/edit.c +++ b/chpass/edit.c @@ -174,7 +174,7 @@ verify(pw) struct stat sb; FILE *fp; int len; - char buf[LINE_MAX]; + static char buf[LINE_MAX]; if (!(fp = fopen(tempname, "r"))) pw_error(tempname, 1, 1); -- cgit v1.2.3-56-ge451