Subject: Re: [PATCH] ASoC: fsl: expand the size of the name in fsl_ssi_private struct

From: Timur Tabi <[email-masked]>
Date: Thu, 23 May 2013 06:19:53 -0500

David Laight wrote:
>> strcpy(ssi_private->name, p) in probe() sets "name" by "p", gotten from dts,
>> >while the length of "p", if the devicetree node name of SSI is commonly set,
>> >would always be larger than 1 char size, so need a larger size for "name".
> Are you sure this isn't allowed for when the structure is allocated?
> Otherwise you also need to use strlcpy() as well.

Yes, this is already handled properly:

p = strrchr(np->full_name, '/') + 1;
ssi_private = kzalloc(sizeof(struct fsl_ssi_private) + strlen(p),
                       GFP_KERNEL);

Nicolin's patch is wrong.  Do not apply it.

-- 
Timur Tabi