- Changed strncpy to strlcpy, strncat to strlcat
- Added strlcpy and strlcat to SICS - Added a driver for the POLDI power supplies SKIPPED: psi/A1931.c psi/autowin.c psi/bruker.c psi/docho.c psi/dornier2.c psi/dspcode.c psi/ease.c psi/ecb.c psi/ecbcounter.c psi/ecbdriv.c psi/el734dc.c psi/el734driv.c psi/el734hp.c psi/el737driv.c psi/el737hpdriv.c psi/el737hpdrivsps.c psi/el737hpv2driv.c psi/el755driv.c psi/eurodriv.c psi/haakedriv.c psi/itc4driv.c psi/julcho.c psi/linadriv.c psi/lmd200.c psi/lscsupport.c psi/ltc11.c psi/make_gen psi/oicom.c psi/oxinst.c psi/pimotor.c psi/pipiezo.c psi/polterwrite.c psi/psi.c psi/sanscook.c psi/sanslirebin.c psi/sanswave.c psi/sinqhmdriv.c psi/sinqhttp.c psi/slsecho.c psi/slsmagnet.c psi/slsvme.c psi/sps.c psi/swmotor.c psi/swmotor2.c psi/tabledrive.c psi/tasscan.c psi/tdchm.c psi/velodorn.c psi/velodornier.c
This commit is contained in:
14
conman.c
14
conman.c
@ -590,10 +590,10 @@ int SCWriteInContext(SConnection * pCon, char *pBuffer, int out,
|
||||
transID = pCon->transID;
|
||||
strcpy(oldDevice, pCon->deviceID);
|
||||
pCon->transID = cc.transID;
|
||||
strncpy(pCon->deviceID, cc.deviceID, SCDEVIDLEN);
|
||||
strlcpy(pCon->deviceID, cc.deviceID, SCDEVIDLEN);
|
||||
status = SCWrite(pCon, pBuffer, out);
|
||||
pCon->transID = transID;
|
||||
strncpy(pCon->deviceID, oldDevice, SCDEVIDLEN);
|
||||
strlcpy(pCon->deviceID, oldDevice, SCDEVIDLEN);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -1281,7 +1281,7 @@ int SCPrompt(SConnection * pCon, char *pPrompt, char *pResult, int iLen)
|
||||
if (iRet == 1) {
|
||||
SetStatus(eOld);
|
||||
CostaLock(pCon->pStack);
|
||||
strncpy(pResult, pPtr, iLen);
|
||||
strlcpy(pResult, pPtr, iLen);
|
||||
WriteToCommandLogId(" prompted>", pCon->sockHandle, pPtr);
|
||||
return 1;
|
||||
}
|
||||
@ -1409,7 +1409,7 @@ int SCInvoke(SConnection * self, SicsInterp * pInter, char *pCommand)
|
||||
SCWrite(self, "ERROR: out of memory in SCInvoke", eError);
|
||||
return 0;
|
||||
}
|
||||
strncpy(pCopy->deviceID, pBueffel, SCDEVIDLEN);
|
||||
strlcpy(pCopy->deviceID, pBueffel, SCDEVIDLEN);
|
||||
/* SCAdvanceContext(self,pBueffel); */
|
||||
iRet = InterpExecute(pInter, pCopy, pCommand);
|
||||
/* SCPopContext(self); */
|
||||
@ -2051,7 +2051,7 @@ long SCTagContext(SConnection * self, char *tagName)
|
||||
return -1;
|
||||
|
||||
a = SCGetContext(self);
|
||||
strncpy(a.deviceID, tagName, SCDEVIDLEN);
|
||||
strlcpy(a.deviceID, tagName, SCDEVIDLEN);
|
||||
/*
|
||||
SCGetContext will already have advanced the stack pointer to the
|
||||
last position
|
||||
@ -2094,7 +2094,7 @@ int SCPushContext(SConnection * self, int ID, char *deviceID)
|
||||
}
|
||||
|
||||
neu.transID = ID;
|
||||
strncpy(neu.deviceID, deviceID, SCDEVIDLEN);
|
||||
strlcpy(neu.deviceID, deviceID, SCDEVIDLEN);
|
||||
LLDnodeAppendFrom(self->contextStack, &neu);
|
||||
return 1;
|
||||
}
|
||||
@ -2116,7 +2116,7 @@ commandContext SCGetContext(SConnection * pCon)
|
||||
return neu;
|
||||
}
|
||||
neu.transID = pCon->transID;
|
||||
strncpy(neu.deviceID, pCon->deviceID, SCDEVIDLEN);
|
||||
strlcpy(neu.deviceID, pCon->deviceID, SCDEVIDLEN);
|
||||
return neu;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user