[PATCH v2] staging: for dgrp, let nd_ps_desc always NUL terminated string within MAX_DESC_LEN length
Dan Carpenter
dan.carpenter at oracle.com
Thu May 2 09:28:59 UTC 2013
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>
regards,
dan carpenter
More information about the devel
mailing list