- 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:
6
ofac.c
6
ofac.c
@ -152,7 +152,7 @@ static int IFServerOption(SConnection * pCon, SicsInterp * pSics,
|
||||
|
||||
/* test if sufficient arguments */
|
||||
if (argc < 3) {
|
||||
sprintf(pBueffel, "Syntax: %s name value ", argv[0]);
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "Syntax: %s name value ", argv[0]);
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
return 0;
|
||||
}
|
||||
@ -181,7 +181,7 @@ static int PWSicsUser(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
/* analyse commandlist */
|
||||
pList = SplitArguments(argc - 1, &argv[1]);
|
||||
if ((!pList) || (!pList->pNext) || (!pList->pNext->pNext)) {
|
||||
sprintf(pBueffel, "Invalid Passwd Entry ::\n %s %s %s\n", argv[1],
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "Invalid Passwd Entry ::\n %s %s %s\n", argv[1],
|
||||
argv[2], argv[3]);
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
DeleteTokenList(pList);
|
||||
@ -487,7 +487,7 @@ int InitObjectCommands(pServer pServ, char *file)
|
||||
|
||||
|
||||
/* evaluate the file */
|
||||
sprintf(pBueffel, "fileeval %s", file);
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "fileeval %s", file);
|
||||
iRet = InterpExecute(pSics, pCon, pBueffel);
|
||||
|
||||
/* done */
|
||||
|
Reference in New Issue
Block a user