From: Phil Carmody <[email protected]>

Array member [pathSize] is set to \0, so the array must be
pathSize+1 bytes in size.

Signed-off-by: Phil Carmody <[email protected]>
---
 drivers/dsp/bridge/pmgr/wcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index 86812c6..7732492 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -530,7 +530,7 @@ u32 MGRWRAP_RegisterObject(union Trapped_Args *args)
                goto func_end;
        pathSize = strlen_user((char *)
                                args->ARGS_MGR_REGISTEROBJECT.pszPathName);
-       pszPathName = MEM_Alloc(pathSize, MEM_NONPAGED);
+       pszPathName = MEM_Alloc(pathSize + 1, MEM_NONPAGED);
        if (!pszPathName)
                goto func_end;
        retVal = strncpy_from_user(pszPathName,
-- 
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to