- 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:
8
fupa.c
8
fupa.c
@@ -70,7 +70,7 @@ int EvaluateFuPa(pFuncTemplate pTemplate, int iFunc, int argc,
|
||||
}
|
||||
}
|
||||
if (iRet == -1) {
|
||||
sprintf(pRes->pError, "ERROR: function %s not available",
|
||||
snprintf(pRes->pError,sizeof(pRes->pError)-1, "ERROR: function %s not available",
|
||||
pCurrent->text);
|
||||
goto end;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ int EvaluateFuPa(pFuncTemplate pTemplate, int iFunc, int argc,
|
||||
pRes->Arg[i].iVal = 0;
|
||||
goto end;
|
||||
} else {
|
||||
sprintf(pRes->pError,
|
||||
snprintf(pRes->pError,sizeof(pRes->pError)-1,
|
||||
"ERROR: Insufficient number of arguments to %s",
|
||||
pTemplate[iRet].name);
|
||||
iRet = -1;
|
||||
@@ -119,7 +119,7 @@ int EvaluateFuPa(pFuncTemplate pTemplate, int iFunc, int argc,
|
||||
pRes->Arg[i].iVal = (int) pCurrent->fVal;
|
||||
continue;
|
||||
} else {
|
||||
sprintf(pRes->pError, "ERROR: expected integer parameter, got %s",
|
||||
snprintf(pRes->pError,sizeof(pRes->pError)-1, "ERROR: expected integer parameter, got %s",
|
||||
pCurrent->text);
|
||||
iRet = -1;
|
||||
goto end;
|
||||
@@ -135,7 +135,7 @@ int EvaluateFuPa(pFuncTemplate pTemplate, int iFunc, int argc,
|
||||
pRes->Arg[i].fVal = pCurrent->fVal;
|
||||
continue;
|
||||
} else {
|
||||
sprintf(pRes->pError, "ERROR: expected float parameter, got %s",
|
||||
snprintf(pRes->pError,sizeof(pRes->pError)-1, "ERROR: expected float parameter, got %s",
|
||||
pCurrent->text);
|
||||
iRet = -1;
|
||||
goto end;
|
||||
|
||||
Reference in New Issue
Block a user