summaryrefslogtreecommitdiff
path: root/openbsd-compat/port-aix.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/port-aix.c')
-rw-r--r--openbsd-compat/port-aix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c
index 7a42810e9..f192a4e79 100644
--- a/openbsd-compat/port-aix.c
+++ b/openbsd-compat/port-aix.c
@@ -52,8 +52,8 @@ aix_usrinfo(struct passwd *pw)
52 len = sizeof("LOGNAME= NAME= ") + (2 * strlen(pw->pw_name)); 52 len = sizeof("LOGNAME= NAME= ") + (2 * strlen(pw->pw_name));
53 cp = xmalloc(len); 53 cp = xmalloc(len);
54 54
55 i = snprintf(cp, "LOGNAME=%s%cNAME=%s%c", pw->pw_name, '\0', 55 i = snprintf(cp, len, "LOGNAME=%s%cNAME=%s%c", pw->pw_name, '\0',
56 pw->pw_name, '\0', len); 56 pw->pw_name, '\0');
57 if (usrinfo(SETUINFO, cp, i) == -1) 57 if (usrinfo(SETUINFO, cp, i) == -1)
58 fatal("Couldn't set usrinfo: %s", strerror(errno)); 58 fatal("Couldn't set usrinfo: %s", strerror(errno));
59 debug3("AIX/UsrInfo: set len %d", i); 59 debug3("AIX/UsrInfo: set len %d", i);