- 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

8
emon.c
View File

@ -117,7 +117,7 @@ int EVRegisterController(pEnvMon self, char *pName, void *pData,
sEntry.pInter = sEntry.pDum->pDescriptor->GetInterface(pData,
ENVIRINTERFACE);
if (sEntry.pInter == NULL) {
sprintf(pBueffel,
snprintf(pBueffel,511,
"ERROR: cannot register %s, no environment interface", pName);
SCWrite(pCon, pBueffel, eError);
return 0;
@ -283,7 +283,7 @@ int EVWrapper(SConnection * pCon, SicsInterp * pSics, void *pData,
}
pCom = FindCommand(pSics, argv[2]);
if (!pCom) {
sprintf(pBueffel, "ERROR: object %s not found, not registered",
snprintf(pBueffel,511, "ERROR: object %s not found, not registered",
argv[2]);
SCWrite(pCon, pBueffel, eError);
return 0;
@ -302,12 +302,12 @@ int EVWrapper(SConnection * pCon, SicsInterp * pSics, void *pData,
}
iRet = EVUnregister(self, argv[2]);
if (!iRet) {
sprintf(pBueffel, "WARNING: %s not found in emon", argv[2]);
snprintf(pBueffel,511, "WARNING: %s not found in emon", argv[2]);
SCWrite(pCon, pBueffel, eWarning);
}
return 1;
} else {
sprintf(pBueffel, "ERROR: %s not recognized as command to emon",
snprintf(pBueffel, 511, "ERROR: %s not recognized as command to emon",
argv[1]);
SCWrite(pCon, pBueffel, eError);
}