summaryrefslogtreecommitdiffstats
path: root/usr.bin/chpass
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-11-15 17:36:20 +0000
committerpeter <peter@FreeBSD.org>1996-11-15 17:36:20 +0000
commitfd402a6d26c62d9f07cdec7bd73441a81293928f (patch)
treead70cfd69f1271d3374edb0f1498c201cafba262 /usr.bin/chpass
parent15e5b314d67600df08174bc50c166e1909013fd4 (diff)
downloadFreeBSD-src-fd402a6d26c62d9f07cdec7bd73441a81293928f.zip
FreeBSD-src-fd402a6d26c62d9f07cdec7bd73441a81293928f.tar.gz
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
Diffstat (limited to 'usr.bin/chpass')
-rw-r--r--usr.bin/chpass/edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/chpass/edit.c b/usr.bin/chpass/edit.c
index cf87fdf..40119f0 100644
--- a/usr.bin/chpass/edit.c
+++ b/usr.bin/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);
OpenPOWER on IntegriCloud