diff options
| author | Eivind Eklund <eivind@FreeBSD.org> | 1998-12-17 16:31:02 +0000 |
|---|---|---|
| committer | Eivind Eklund <eivind@FreeBSD.org> | 1998-12-17 16:31:02 +0000 |
| commit | 630dc76f4e84d2c5097518cf55c9e9bb66a04d36 (patch) | |
| tree | 34612155162d8503ce5508d0d026656b38b33c0e /lib/libc | |
| parent | 36cabb9282c03133b351d57c9be0b972b7ad9076 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/gen/getpwent.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index e24de8123b46..2ee0e32aabc7 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -153,7 +153,9 @@ getpwnam(name) return((struct passwd *)NULL); bf[0] = _PW_KEYBYNAME; - len = MIN(strlen(name), UT_NAMESIZE); + len = strlen(name); + if (len > UT_NAMESIZE) + return(NULL); bcopy(name, bf + 1, len); key.data = (u_char *)bf; key.size = len + 1; |
