Restore old semantics (broken in rev 1.47's buffer overflow fix).
This commit is contained in:
parent
36cabb9282
commit
630dc76f4e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41898
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user