- 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

@@ -137,13 +137,13 @@ static int readFileFrame(SConnection * pCon,
status = NXopen(file, NXACC_READ, &fileHandle);
if (status != NX_OK) {
sprintf(error, "ERROR: failed to open %s", file);
snprintf(error,sizeof(error)-1, "ERROR: failed to open %s", file);
SCWrite(pCon, error, eError);
return 0;
}
status = NXDinitfromfile(dictFile, &dictHandle);
if (status != NX_OK) {
sprintf(error, "ERROR: failed to open dictionary %s", dictFile);
snprintf(error,sizeof(error)-1, "ERROR: failed to open dictionary %s", dictFile);
NXclose(&fileHandle);
SCWrite(pCon, error, eError);
return 0;
@@ -151,7 +151,7 @@ static int readFileFrame(SConnection * pCon,
status = NXDopenalias(fileHandle, dictHandle, alias);
if (status != NX_OK) {
sprintf(error, "ERROR: failed to open alias %s", alias);
snprintf(error,sizeof(error)-1, "ERROR: failed to open alias %s", alias);
NXclose(&fileHandle);
NXDclose(dictHandle, NULL);
SCWrite(pCon, error, eError);
@@ -162,7 +162,7 @@ static int readFileFrame(SConnection * pCon,
if (type != NX_INT32 && type != NX_UINT32)
type = -1;
if (status != NX_OK || rank < 2 || type < 0) {
sprintf(error, "ERROR: Dataset does not match!");
snprintf(error,sizeof(error)-1, "ERROR: Dataset does not match!");
NXclose(&fileHandle);
NXDclose(dictHandle, NULL);
SCWrite(pCon, error, eError);