strc{py,at}_truncate -> strlc{py,at}

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6985 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-09-16 21:39:11 +00:00
parent bf75fac82a
commit d3f5d79294
15 changed files with 52 additions and 48 deletions

View File

@@ -309,8 +309,8 @@ ipv6_print_addr (const krb5_address *addr, char *str, size_t len)
for(i = 0; i < addr->address.length; i++) {
snprintf(buf2, sizeof(buf2), "%02x", p[i]);
if(i > 0 && (i & 1) == 0)
strcat_truncate(buf, ":", sizeof(buf));
strcat_truncate(buf, buf2, sizeof(buf));
strlcat(buf, ":", sizeof(buf));
strlcat(buf, buf2, sizeof(buf));
}
}
return snprintf(str, len, "IPv6:%s", buf);

View File

@@ -251,7 +251,7 @@ fkt_get_name(krb5_context context,
{
/* This function is XXX */
struct fkt_data *d = id->data;
strcpy_truncate(name, d->filename, namesize);
strlcpy(name, d->filename, namesize);
return 0;
}

View File

@@ -168,7 +168,7 @@ akf_get_name(krb5_context context,
{
struct akf_data *d = id->data;
strcpy_truncate (name, d->filename, name_sz);
strlcpy (name, d->filename, name_sz);
return 0;
}

View File

@@ -70,7 +70,7 @@ krb4_kt_get_name (krb5_context context,
{
struct krb4_kt_data *d = id->data;
strcpy_truncate (name, d->filename, name_sz);
strlcpy (name, d->filename, name_sz);
return 0;
}

View File

@@ -70,7 +70,7 @@ krb5_sock_to_principal (krb5_context context,
if (hostent == NULL)
return h_errno;
strcpy_truncate(hname, hostent->h_name, sizeof(hname));
strlcpy(hname, hostent->h_name, sizeof(hname));
return krb5_sname_to_principal (context,
hname,
sname,