From: Ameya Palande <ameya.palande@xxxxxxxxx> Signed-off-by: Ameya Palande <ameya.palande@xxxxxxxxx> --- drivers/dsp/bridge/pmgr/cod.c | 2 +- drivers/dsp/bridge/rmgr/drv.c | 2 +- drivers/dsp/bridge/services/regsup.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dsp/bridge/pmgr/cod.c b/drivers/dsp/bridge/pmgr/cod.c index 6363f1e..5094201 100644 --- a/drivers/dsp/bridge/pmgr/cod.c +++ b/drivers/dsp/bridge/pmgr/cod.c @@ -628,7 +628,7 @@ DSP_STATUS COD_OpenBase(struct COD_MANAGER *hMgr, IN char *pszCoffPath, } else { /* hang onto the library for subsequent sym table usage */ hMgr->baseLib = lib; - strncpy(hMgr->szZLFile, pszCoffPath, COD_MAXPATHLENGTH); + strncpy(hMgr->szZLFile, pszCoffPath, COD_MAXPATHLENGTH - 1); } return status; diff --git a/drivers/dsp/bridge/rmgr/drv.c b/drivers/dsp/bridge/rmgr/drv.c index 256ce12..60ca054 100644 --- a/drivers/dsp/bridge/rmgr/drv.c +++ b/drivers/dsp/bridge/rmgr/drv.c @@ -1510,7 +1510,7 @@ DSP_STATUS DRV_RequestResources(u32 dwContext, u32 *pDevNodeString) if (pszdevNode) { LST_InitElem(&pszdevNode->link); strncpy((char *) pszdevNode->szString, - (char *)dwContext, MAXREGPATHLENGTH); + (char *)dwContext, MAXREGPATHLENGTH - 1); /* Update the Driver Object List */ *pDevNodeString = (u32)pszdevNode->szString; LST_PutTail(pDRVObject->devNodeString, diff --git a/drivers/dsp/bridge/services/regsup.c b/drivers/dsp/bridge/services/regsup.c index 5251b68..b0c6e00 100644 --- a/drivers/dsp/bridge/services/regsup.c +++ b/drivers/dsp/bridge/services/regsup.c @@ -238,8 +238,8 @@ DSP_STATUS regsupSetValue(char *valName, void *pBuf, u32 dataSize) /* No match, need to make a new entry */ /* First check to see if we can make any more entries. */ if (pRegKey->numValueEntries < BRIDGE_MAX_NUM_REG_ENTRIES) { - strncpy(pRegKey->values[pRegKey->numValueEntries].name, - valName, BRIDGE_MAX_NAME_SIZE); + strncpy(pRegKey->values[pRegKey->numValueEntries].name, + valName, BRIDGE_MAX_NAME_SIZE - 1); pRegKey->values[pRegKey->numValueEntries].pData = MEM_Alloc(dataSize, MEM_NONPAGED); if (pRegKey->values[pRegKey->numValueEntries].pData != -- 1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html