- 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:
@ -126,7 +126,7 @@ int IncrementPerfMon(pPerfMon self)
|
||||
self->tLast = tCurrent;
|
||||
self->tTarget = tCurrent + self->iInteg;
|
||||
if (self->iLog) {
|
||||
sprintf(pBueffel, "PerfMon = %f", self->fCPS);
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "PerfMon = %f", self->fCPS);
|
||||
SICSLogWrite(pBueffel, eValue);
|
||||
}
|
||||
InvokeCallBack(self->pCall, VALUECHANGE, &self->fCPS);
|
||||
@ -158,7 +158,7 @@ static int InterestCallback(int iEvent, void *pEvent, void *pUser)
|
||||
return -1;
|
||||
}
|
||||
|
||||
sprintf(pBueffel, "Performance = %f", *fPos);
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "Performance = %f", *fPos);
|
||||
SCWrite(pCon, pBueffel, eValue);
|
||||
return 1;
|
||||
}
|
||||
@ -184,7 +184,7 @@ int PerfMonWrapper(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
|
||||
argtolower(argc, argv);
|
||||
if (argc < 2) { /* print value */
|
||||
sprintf(pBueffel, "Performance = %f", self->fCPS);
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "Performance = %f", self->fCPS);
|
||||
SCWrite(pCon, pBueffel, eValue);
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user