diff options
author | peter <peter@FreeBSD.org> | 1996-11-15 17:36:20 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-11-15 17:36:20 +0000 |
commit | fd402a6d26c62d9f07cdec7bd73441a81293928f (patch) | |
tree | ad70cfd69f1271d3374edb0f1498c201cafba262 /usr.bin | |
parent | 15e5b314d67600df08174bc50c166e1909013fd4 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | usr.bin/chpass/edit.c | 2 |
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); |