From 447dec0fa17c11bb9352e0f4c9fef73bf76c0b73 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 7 Dec 1996 07:07:35 +0000 Subject: [PATCH] buf oflow --- kerberosIV/krb/kuserok.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 */ /* -- 2.20.1