- 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

10
danu.c
View File

@ -89,7 +89,7 @@ static int writeDataNumber(pDataNumber self, int iNum)
fprintf(fd, " %d \n", iNum);
fprintf(fd, "NEVER, EVER modify or delete this file\n");
fprintf(fd,
"You'll risk eternal damnation and a reincarnation as a cockroach!|n");
"You'll risk eternal damnation and a reincarnation as a cockroach!\n");
fclose(fd);
return 1;
}
@ -278,7 +278,7 @@ int DNWrapper(SConnection * pCon, SicsInterp * pSics, void *pData,
if (argc < 2) { /* value request */
iNum = readDataNumber(self);
if (iNum < 0) {
sprintf(pBueffel, "ERROR: cannot open file %s", self->pFileName);
snprintf(pBueffel,511, "ERROR: cannot open file %s", self->pFileName);
SCWrite(pCon, pBueffel, eError);
return 0;
}
@ -324,7 +324,7 @@ int DNWrapper(SConnection * pCon, SicsInterp * pSics, void *pData,
SCSendOK(pCon);
}
sprintf(pBueffel, "ERROR: unknown command %s supplied to %s",
snprintf(pBueffel,511, "ERROR: unknown command %s supplied to %s",
argv[1], argv[0]);
SCWrite(pCon, pBueffel, eError);
return 0;
@ -377,13 +377,13 @@ int DNFactory(SConnection * pCon, SicsInterp * pSics, void *pData,
iRet = AddCommand(pSics, argv[1], DNWrapper, DeleteDataNumber, self);
if (!iRet) {
sprintf(pBueffel, "ERROR: duplicate command %s not created", argv[1]);
snprintf(pBueffel, 511,"ERROR: duplicate command %s not created", argv[1]);
SCWrite(pCon, pBueffel, eError);
return 0;
}
iRet = AddCommand(pSics, "killfile", DEWrapper, NULL, self);
if (!iRet) {
sprintf(pBueffel, "ERROR: duplicate command %s not created", argv[1]);
snprintf(pBueffel, 511,"ERROR: duplicate command %s not created", argv[1]);
SCWrite(pCon, pBueffel, eError);
return 0;
}