- After a bug at TRICS I replaced all occurrences of strcpy, strcat, sprintf

by length limited versions wherever appropriate.
This commit is contained in:
koennecke
2009-12-04 12:58:45 +00:00
parent 09826fb097
commit 4127cbb166
9 changed files with 42 additions and 43 deletions

View File

@ -118,13 +118,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,511, "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,511, "ERROR: failed to open dictionary %s", dictFile);
NXclose(&fileHandle);
SCWrite(pCon, error, eError);
return 0;
@ -132,7 +132,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,511, "ERROR: failed to open alias %s", alias);
NXclose(&fileHandle);
NXDclose(dictHandle, NULL);
SCWrite(pCon, error, eError);