From: Chen Gang <gang.chen@asianux.com>
To: David Miller <davem@davemloft.net>
Cc: bhutchings@solarflare.com, David.Laight@ACULAB.COM,
venkat.x.venkatsubra@oracle.com, rds-devel@oss.oracle.com,
netdev@vger.kernel.org
Subject: Re: [PATCH] net/rds: zero last byte for strncpy
Date: Fri, 08 Mar 2013 14:13:23 +0800 [thread overview]
Message-ID: <51398183.5090800@asianux.com> (raw)
In-Reply-To: <20130308.003630.1150878411855053823.davem@davemloft.net>
于 2013年03月08日 13:36, David Miller 写道:
> From: Chen Gang <gang.chen@asianux.com>
> Date: Fri, 08 Mar 2013 11:19:32 +0800
>
>>
>> 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>
>
> Applied.
>
>
thanks.
--
Chen Gang
Asianux Corporation
prev parent reply other threads:[~2013-03-08 6:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 8:28 [PATCH] net/rds: using strlcpy instead of strncpy Chen Gang
2013-02-28 9:36 ` David Laight
2013-02-28 10:26 ` Chen Gang
2013-03-04 18:32 ` Ben Hutchings
2013-03-04 18:34 ` Ben Hutchings
2013-03-05 2:32 ` Chen Gang
2013-03-05 3:16 ` Ben Hutchings
2013-03-05 3:32 ` Chen Gang
2013-03-05 3:37 ` Ben Hutchings
2013-03-05 4:09 ` Chen Gang
2013-03-05 17:00 ` Ben Hutchings
2013-03-07 4:03 ` Chen Gang
2013-03-08 3:19 ` [PATCH] net/rds: zero last byte for strncpy Chen Gang
2013-03-08 5:36 ` David Miller
2013-03-08 6:13 ` Chen Gang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51398183.5090800@asianux.com \
--to=gang.chen@asianux.com \
--cc=David.Laight@ACULAB.COM \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.com \
--cc=venkat.x.venkatsubra@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.