- 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

View File

@@ -94,7 +94,7 @@ int ChocoAction(SConnection * pCon, SicsInterp * pSics, void *pData,
assert(self);
if (argc < 2) {
sprintf(pMessage, "ERROR: argument required for %s", argv[0]);
snprintf(pMessage,255, "ERROR: argument required for %s", argv[0]);
SCWrite(pCon, pMessage, eError);
return 0;
}
@@ -192,7 +192,7 @@ int ChocoFactory(SConnection * pCon, SicsInterp * pSics, void *pData,
pDriv = NULL;
}
if (pDriv == NULL) {
sprintf(pBueffel,
snprintf(pBueffel,131,
"ERROR: Driver %s NOT supported for MakeController",
argv[2]);
SCWrite(pCon, pBueffel, eError);
@@ -217,7 +217,7 @@ int ChocoFactory(SConnection * pCon, SicsInterp * pSics, void *pData,
/* install as command */
iRet = AddCommand(pSics, argv[1], ChocoAction, KillChoco, pNew);
if (!iRet) {
sprintf(pBueffel, "ERROR: duplicate command %s NOT created", argv[1]);
snprintf(pBueffel, 131, "ERROR: duplicate command %s NOT created", argv[1]);
SCWrite(pCon, pBueffel, eError);
return 0;
}