- After a bug at TRICS I replaced all occurrences of strcpy, strcat, sprintf

by length limited versions wherever appropriate.


SKIPPED:
	psi/el755driv.c
	psi/faverage.c
	psi/frame.c
	psi/lmd200.c
	psi/polterwrite.c
	psi/psi.c
	psi/sanswave.c
	psi/sinqhmdriv.c
	psi/termprot.c
This commit is contained in:
koennecke
2009-12-04 12:58:31 +00:00
parent 297f9f2e02
commit 8cc5474334
80 changed files with 899 additions and 881 deletions

4
sel2.c
View File

@@ -268,7 +268,7 @@ long tim;
int sts;
long err;
char cmd[20] = "TIM ";
sprintf(&cmd + 4, "%5u\0", tim);
snprintf(&cmd + 4,sizeof(&cmd + 4)-1, "%5u\0", tim);
sts = sele_write(cmd);
if (sele_test_echo(&cmd, 3) != OK)
lib$stop(-1);
@@ -376,7 +376,7 @@ int rpm;
print_error(fs, "nominal value within inhibited range");
return;
}
sprintf(&s_dat + 4, "%5u", rpm);
snprintf(&s_dat + 4,sizeof(&s_dat + 4)-1, "%5u", rpm);
sts = sele_write(s_dat);
if (sele_test_echo(&cmd, 3) != OK)
lib$stop(-1);