- 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:
@@ -134,7 +134,7 @@ int MakeTclInt(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
iRet =
|
||||
AddCommand(pSics, argv[1], TclIntAction, KillTclInt, (void *) pNew);
|
||||
if (!iRet) {
|
||||
sprintf(pBuffer, "ERROR: duplicate command %s not created", argv[1]);
|
||||
snprintf(pBuffer,sizeof(pBuffer)-1, "ERROR: duplicate command %s not created", argv[1]);
|
||||
SCWrite(pCon, pBuffer, eError);
|
||||
return 0;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ int TclIntAction(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
SCWrite(pCon, pBuffer, eValue);
|
||||
return 1;
|
||||
} else {
|
||||
sprintf(pBuffer, "ERROR: %s expects at least one argument!",
|
||||
snprintf(pBuffer,sizeof(pBuffer)-1, "ERROR: %s expects at least one argument!",
|
||||
argv[0]);
|
||||
SCWrite(pCon, pBuffer, eError);
|
||||
return 0;
|
||||
@@ -191,7 +191,7 @@ int TclIntAction(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
}
|
||||
return 1;
|
||||
} else {
|
||||
sprintf(pBuffer, "ERROR: keyword %s to %s not recognized",
|
||||
snprintf(pBuffer,sizeof(pBuffer)-1, "ERROR: keyword %s to %s not recognized",
|
||||
argv[1], argv[0]);
|
||||
SCWrite(pCon, pBuffer, eError);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user