It looks good. Thanks > -----Original Message----- > From: Ameya Palande [mailto:ameya.palande@xxxxxxxxx] > Sent: Thursday, July 02, 2009 9:21 AM > To: linux-omap@xxxxxxxxxxxxxxx > Cc: Guzman Lugo, Fernando; Kanigeri, Hari; ext-phil.2.carmody@xxxxxxxxx > Subject: [PATCH 1/4] DSPBRIDGE: always malloc strlen+1 for the trailing \0 > > From: Phil Carmody <ext-phil.2.carmody@xxxxxxxxx> > > Array member [pathSize] is set to \0, so the array must be > pathSize+1 bytes in size. > > Signed-off-by: Phil Carmody <ext-phil.2.carmody@xxxxxxxxx> > --- > 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 > Acked-by Fernando Guzman Lugo <x0095840@xxxxxx> -- 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