- 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:
6
obpar.c
6
obpar.c
@ -169,21 +169,21 @@ int ObParSet(ObPar * self, char *obname, char *name, float fVal,
|
||||
/* find the parameter */
|
||||
pPar = ObParFind(self, name);
|
||||
if (pPar == NULL) {
|
||||
sprintf(pBueffel, "ERROR: %s.%s parameter not found", obname, name);
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "ERROR: %s.%s parameter not found", obname, name);
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* are we running? */
|
||||
if(DevExecLevelRunning(pServ->pExecutor, RUNDRIVE)){
|
||||
sprintf(pBueffel, "ERROR: Cannot change parameter while running");
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "ERROR: Cannot change parameter while running");
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* check permission */
|
||||
if (!SCMatchRights(pCon, pPar->iCode)) {
|
||||
sprintf(pBueffel, "ERROR: Insufficient privilege to change %s.%s",
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "ERROR: Insufficient privilege to change %s.%s",
|
||||
obname, name);
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user