replace sprintf all over the place

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1635 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-05-02 14:29:33 +00:00
parent 1495f52771
commit dd02a92a8b
55 changed files with 831 additions and 471 deletions

View File

@@ -436,7 +436,8 @@ send_do(int option, int init)
set_his_want_state_will(option);
do_dont_resp[option]++;
}
sprintf(nfrontp, (char *)doopt, option);
snprintf(nfrontp, BUFSIZ - (nfrontp - netobuf),
(char *)doopt, option);
nfrontp += sizeof (dont) - 2;
DIAG(TD_OPTIONS, printoption("td: send do", option));
@@ -655,7 +656,8 @@ send_dont(int option, int init)
set_his_want_state_wont(option);
do_dont_resp[option]++;
}
sprintf(nfrontp, (char *)dont, option);
snprintf(nfrontp, BUFSIZ - (nfrontp - netobuf),
(char *)dont, option);
nfrontp += sizeof (doopt) - 2;
DIAG(TD_OPTIONS, printoption("td: send dont", option));
@@ -802,7 +804,8 @@ send_will(int option, int init)
set_my_want_state_will(option);
will_wont_resp[option]++;
}
sprintf(nfrontp, (char *)will, option);
snprintf(nfrontp, BUFSIZ - (nfrontp - netobuf),
(char *)will, option);
nfrontp += sizeof (doopt) - 2;
DIAG(TD_OPTIONS, printoption("td: send will", option));
@@ -959,7 +962,8 @@ send_wont(int option, int init)
set_my_want_state_wont(option);
will_wont_resp[option]++;
}
sprintf(nfrontp, (char *)wont, option);
snprintf(nfrontp, BUFSIZ - (nfrontp - netobuf),
(char *)wont, option);
nfrontp += sizeof (wont) - 2;
DIAG(TD_OPTIONS, printoption("td: send wont", option));
@@ -1355,7 +1359,9 @@ suboption(void)
env_ovar_wrong:
env_ovar = OLD_ENV_VALUE;
env_ovalue = OLD_ENV_VAR;
DIAG(TD_OPTIONS, {sprintf(nfrontp,
DIAG(TD_OPTIONS, {snprintf(nfrontp,
BUFSIZ -
(nfrontp - netobuf),
"ENVIRON VALUE and VAR are reversed!\r\n");
nfrontp += strlen(nfrontp);});