From 969a7fd678eff33053c839504550aa4edfdcd777 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 27 Jan 2003 20:45:03 +0000 Subject: [PATCH] krb4 library breaks old krb_get_admhst API * RealmsConfig-glue.c (krb_get_admhst): Use strcpy instead of strncpy, and max length of MAX_HSTNM. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15134 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb4/ChangeLog | 5 +++++ src/lib/krb4/RealmsConfig-glue.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index e43bd5901..5fcf19ef7 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,8 @@ +2003-01-27 Ken Raeburn + + * RealmsConfig-glue.c (krb_get_admhst): Use strcpy instead of + strncpy, and max length of MAX_HSTNM. + 2003-01-15 Ken Raeburn * sendauth.c (krb_net_rd_sendauth): Arg raw_len now points to diff --git a/src/lib/krb4/RealmsConfig-glue.c b/src/lib/krb4/RealmsConfig-glue.c index e993a0036..e71bc0074 100644 --- a/src/lib/krb4/RealmsConfig-glue.c +++ b/src/lib/krb4/RealmsConfig-glue.c @@ -342,8 +342,8 @@ krb_get_admhst( i++; } fclose(cnffile); - if (result == KSUCCESS && strlen(thost) < MAXHOSTNAMELEN) - strncpy(host, thost, MAXHOSTNAMELEN); + if (result == KSUCCESS && strlen(thost) < MAX_HSTNM) + strcpy(host, thost); else result = KFAILURE; return result; -- 2.26.2