- 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:
6
nread.c
6
nread.c
@@ -21,6 +21,8 @@
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
#include <strlutil.h>
|
||||
|
||||
#include "fortify.h"
|
||||
#include "lld.h"
|
||||
#include "network.h"
|
||||
@@ -289,7 +291,7 @@ static int NetReadRead(pNetRead self, pNetItem pItem)
|
||||
*pEnd = '\0';
|
||||
/* do we have something in hold ? */
|
||||
if (strlen(pItem->pHold) > 0) {
|
||||
strncat(pItem->pHold, pPtr,511);
|
||||
strlcat(pItem->pHold, pPtr,511);
|
||||
iStat = CostaTop(pItem->pCon->pStack, pItem->pHold);
|
||||
if (!iStat) {
|
||||
SCWrite(pItem->pCon, "ERROR: Busy", eError);
|
||||
@@ -320,7 +322,7 @@ static int NetReadRead(pNetRead self, pNetItem pItem)
|
||||
}
|
||||
/* when we are here we may still have an incomplete command pending */
|
||||
if (pEnd != pPtr && strlen(pPtr) > 0) {
|
||||
strncpy(pItem->pHold, pPtr, 511);
|
||||
strlcpy(pItem->pHold, pPtr, 511);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user