diff options
author | Christopher Faylor <me@cgf.cx> | 2003-01-01 21:12:49 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-01-01 21:12:49 +0300 |
commit | 8619b42be78d0e18192bded34268eb2614a98eba (patch) | |
tree | 1f80cb5d87af2c5578fa3f00d4f226991ebadfe4 /winsup/cygwin/passwd.cc | |
parent | 353549d7441a2a8fddb4467ee796445e9db30abc (diff) |
* sysconf.cc (sysconf): Return arbitrary values for _SC_GETGR_R_SIZE_MAX,
_SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
* passwd.cc (getpwuid_r32): Add uid/gid fields to size check calculation.
Diffstat (limited to 'winsup/cygwin/passwd.cc')
-rw-r--r-- | winsup/cygwin/passwd.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index c3bb7a115..8f947a4fc 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -266,7 +266,8 @@ getpwuid_r32 (__uid32_t uid, struct passwd *pwd, char *buffer, size_t bufsize, s /* check needed buffer size. */ size_t needsize = strlen (temppw->pw_name) + strlen (temppw->pw_dir) + strlen (temppw->pw_shell) + strlen (temppw->pw_gecos) + - strlen (temppw->pw_passwd) + 5; + strlen (temppw->pw_passwd) + 5 + + sizeof (temppw->pw_uid) + sizeof (temppw->pw_gid); if (needsize > bufsize) return ERANGE; |