On Thu, 2018-06-07 at 14:08 +0530, Viresh Kumar wrote:
> On 07-06-18, 15:46, Du, Changbin wrote:
> > I think if the destination is not a null terminated string (If I understand 
> > your
> > description below), memcpy can be used to get rid of such warning. The 
> > warning
> > makes sense in general as explained in mannual. Thanks!
> 
> The destination should be a null terminated string eventually, but we first 
> need
> to make sure src is a null terminated string.

Is there strnlen() or memchr() in the kernel?
Then check the source before copying it.

Kind regards,
        Bernd
-- 
Bernd Petrovitsch                  Email : be...@petrovitsch.priv.at
                     LUGA : http://www.luga.at

Reply via email to