Thread (15 messages) 15 messages, 4 authors, 2013-03-08

Re: [PATCH] net/rds: zero last byte for strncpy

From: Chen Gang <hidden>
Date: 2013-03-08 06:13:47

于 2013年03月08日 13:36, David Miller 写道:
From: Chen Gang <redacted>
Date: Fri, 08 Mar 2013 11:19:32 +0800
quoted
  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 <redacted>
Signed-off-by: Ben Hutchings <redacted>
Applied.
  thanks.

-- 
Chen Gang

Asianux Corporation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help