staging: for dgrp, let nd_ps_desc always NUL terminated string within MAX_DESC_LEN...
authorChen Gang <gang.chen@asianux.com>
Thu, 2 May 2013 09:05:28 +0000 (17:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 May 2013 22:08:16 +0000 (18:08 -0400)
commit0f6e8aab94035f5a649195a2179813bc3db98272
tree31e988ba451f2312af345effbd683ff02629f96a
parent205179d0c02cb3f59eda77d3e6cc895b7d4b06bd
staging: for dgrp, let nd_ps_desc always NUL terminated string within MAX_DESC_LEN length

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).

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgrp/dgrp_dpa_ops.c
drivers/staging/dgrp/dgrp_net_ops.c
drivers/staging/dgrp/drp.h
This page took 0.029688 seconds and 5 git commands to generate.