merge strcpy_truncate branch

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5027 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1998-06-09 19:25:40 +00:00
parent e255dfc950
commit a5f54865d4
87 changed files with 689 additions and 499 deletions

View File

@@ -391,8 +391,8 @@ void edithost(char *pat, char *host)
pat++;
}
if (*host)
strncpy(res, host,
sizeof editedhost - (res - editedhost) -1);
strcpy_truncate (res, host,
sizeof editedhost - (res - editedhost));
else
*res = '\0';
editedhost[sizeof editedhost - 1] = '\0';
@@ -527,7 +527,7 @@ printsub(int direction, unsigned char *pointer, int length)
/* where suboption data sits */
/* length of suboption data */
{
int i;
int i = 0;
unsigned char buf[512];
if (!(diagnostic & TD_OPTIONS))