- 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:
@ -289,7 +289,7 @@ static int TclDrivableCheckLimits(void *data, float fVal,
|
||||
pTcl = InterpGetTcl(pServ->pSics);
|
||||
commandPart1 = getTclDrivableCommand(data, TCLCHECK);
|
||||
if (commandPart1 != NULL) {
|
||||
sprintf(pNum, "%f", fVal);
|
||||
snprintf(pNum,sizeof(pNum)-1, "%f", fVal);
|
||||
command = combine(commandPart1, pNum);
|
||||
if (command) {
|
||||
status = Tcl_Eval(pTcl, command);
|
||||
@ -326,7 +326,7 @@ static long TclDrivableSetValue(void *data, SConnection * pCon, float fVal)
|
||||
/*
|
||||
build and check command string
|
||||
*/
|
||||
sprintf(pNum, "%f", fVal);
|
||||
snprintf(pNum,sizeof(pNum)-1, "%f", fVal);
|
||||
commandHead = getTclDrivableCommand(data, TCLSET);
|
||||
if (commandHead == NULL) {
|
||||
SCWrite(pCon,
|
||||
|
Reference in New Issue
Block a user