- 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:
@ -258,7 +258,7 @@ static int MMCCTransfer(void *pData, SConnection * pCon)
|
||||
status = self->slaves[i]->TransferData(self->slaveData[i], pCon);
|
||||
if (status != OKOK) {
|
||||
retVal = status;
|
||||
sprintf(pBueffel,
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1,
|
||||
"WARNING: slave histogram %d failed to transfer data", i);
|
||||
SCWrite(pCon, pBueffel, eWarning);
|
||||
}
|
||||
@ -480,14 +480,14 @@ int MakeMultiCounter(SConnection * pCon, SicsInterp * pSics,
|
||||
for (i = 2; i < argc; i++) {
|
||||
pCom = FindCommand(pSics, argv[i]);
|
||||
if (!pCom) {
|
||||
sprintf(pBueffel, "ERROR: object %s not found in MakeMultiCounter",
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "ERROR: object %s not found in MakeMultiCounter",
|
||||
argv[i]);
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
continue;
|
||||
}
|
||||
pCount = GetCountableInterface(pCom->pData);
|
||||
if (!pCount) {
|
||||
sprintf(pBueffel, "ERROR: object %s is NOT countable", argv[i]);
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "ERROR: object %s is NOT countable", argv[i]);
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
continue;
|
||||
}
|
||||
@ -502,7 +502,7 @@ int MakeMultiCounter(SConnection * pCon, SicsInterp * pSics,
|
||||
status = AddCommand(pSics, argv[1], MultiCounterAction, DeleteCounter,
|
||||
pNew);
|
||||
if (!status) {
|
||||
sprintf(pBueffel, "ERROR: duplicate command %s not created", argv[1]);
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "ERROR: duplicate command %s not created", argv[1]);
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
DeleteCounter(pNew);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user