diff --git a/lib/krb5/krbhst.c b/lib/krb5/krbhst.c index 8b4ad0726..27b12cdf4 100644 --- a/lib/krb5/krbhst.c +++ b/lib/krb5/krbhst.c @@ -124,7 +124,7 @@ srv_find_realm(krb5_context context, krb5_krbhst_info ***res, int *count, else hi->port = rr->u.srv->port; - strlcpy(hi->hostname, rr->u.srv->target, len); + strlcpy(hi->hostname, rr->u.srv->target, len + 1); } *count = num_srv;