- Changed strncpy to strlcpy, strncat to strlcat
- Added strlcpy and strlcat to SICS - Added a driver for the POLDI power supplies
This commit is contained in:
@@ -197,16 +197,16 @@ static int DornierError(pVelSelDriv self, int *iCode, char *error,
|
||||
|
||||
switch (pDorn->iLastError) {
|
||||
case NOCOMMAND:
|
||||
strncpy(error, "No command was specified, internal error", iErrLen);
|
||||
strlcpy(error, "No command was specified, internal error", iErrLen);
|
||||
break;
|
||||
case ECHOMISSING:
|
||||
strncpy(error, "No echo received, may be busy", iErrLen);
|
||||
strlcpy(error, "No echo received, may be busy", iErrLen);
|
||||
break;
|
||||
case BADANALYSIS:
|
||||
strncpy(error, "Error analysing status messge", iErrLen);
|
||||
strlcpy(error, "Error analysing status messge", iErrLen);
|
||||
break;
|
||||
case STARTTIMEOUT:
|
||||
strncpy(error, "Velocity Selector failed to start", iErrLen);
|
||||
strlcpy(error, "Velocity Selector failed to start", iErrLen);
|
||||
break;
|
||||
default:
|
||||
SerialError(pDorn->iLastError, error, iErrLen);
|
||||
@@ -407,7 +407,7 @@ static int DornierText(pVelSelDriv self, char *pText, int iTextLen)
|
||||
sprintf(pHelp, "Vaccum: %f, Accel: %f", sStatus.vacuum, sStatus.accel);
|
||||
strcat(pBueffel, pHelp);
|
||||
|
||||
strncpy(pText, pBueffel, iTextLen);
|
||||
strlcpy(pText, pBueffel, iTextLen);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user