From: deraadt Date: Sat, 7 Dec 1996 07:07:35 +0000 (+0000) Subject: buf oflow X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=447dec0fa17c11bb9352e0f4c9fef73bf76c0b73;p=openbsd buf oflow --- diff --git a/kerberosIV/krb/kuserok.c b/kerberosIV/krb/kuserok.c index fd888fcc72c..74e8878825a 100644 --- a/kerberosIV/krb/kuserok.c +++ b/kerberosIV/krb/kuserok.c @@ -122,8 +122,7 @@ kuserok(kdata, luser) if ((pwd = getpwnam(luser)) == NULL) { return(NOTOK); } - (void) strcpy(pbuf, pwd->pw_dir); - (void) strcat(pbuf, "/.klogin"); + snprintf(pbuf, sizeof pbuf, "%s/.klogin", pwd->pw_dir); if (access(pbuf, F_OK)) { /* not accessible */ /*