[PATCH v2] staging: for dgrp, let nd_ps_desc always NUL terminated string within MAX_DESC_LEN length

Chen Gang gang.chen at asianux.com
Thu May 2 09:42:50 UTC 2013


On 2013年05月02日 17:28, Dan Carpenter wrote:
> On Thu, May 02, 2013 at 05:05:28PM +0800, Chen Gang wrote:
>> > 
>> > Use strlcpy instead of strncpy to let nd_ps_desc always NUL terminated.
>> > 
>> > Change nd_ps_desc in nd_struct struct to MAX_DESC_LEN to avoid the 
>> > confusion (the related length checking also need be changed to 
>> > MAX_DESC_LEN - 1).
>> > 
> Looks good.
> 
> Acked-by: Dan Carpenter <dan.carpenter at oracle.com>

Thanks.

-- 
Chen Gang

Asianux Corporation



More information about the devel mailing list