]> git.baikalelectronics.ru Git - kernel.git/commit
net/rds: zero last byte for strncpy
authorChen Gang <gang.chen@asianux.com>
Thu, 7 Mar 2013 17:19:32 +0000 (17:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Mar 2013 05:35:44 +0000 (00:35 -0500)
commitcdfe49070b0050d1b4ad52426f82364bbb0ed82d
tree12412103c1a5bfde782c1692231bd40844267c73
parent810210be3d32156ccee86834669e2a4fafdeadfa
net/rds: zero last byte for strncpy

for NUL terminated string, need be always sure '\0' in the end.

additional info:
  strncpy will pads with zeroes to the end of the given buffer.
  should initialise every bit of memory that is going to be copied to userland

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/stats.c