diff options
author | Peter Wemm <peter@FreeBSD.org> | 1996-11-15 17:36:20 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 1996-11-15 17:36:20 +0000 |
commit | 86ef4a30baf0c325b20cff8b2867b14e45683e61 (patch) | |
tree | 51fb50d1830fd91164fae7c4d2fbdfa81d5bedc9 /chpass/edit.c | |
parent | bcbfd5e99ee20c241ad6ac11d9e75826900944ac (diff) | |
download | pw-darwin-86ef4a30baf0c325b20cff8b2867b14e45683e61.tar.gz pw-darwin-86ef4a30baf0c325b20cff8b2867b14e45683e61.tar.zst pw-darwin-86ef4a30baf0c325b20cff8b2867b14e45683e61.zip |
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 'chpass/edit.c')
-rw-r--r-- | chpass/edit.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |