Re: [PATCH] staging: lustre: lustre: ptlrpc: nrs.c: Cleaning up missing null-terminate after strncpy call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2014-08-11 12:58 GMT+02:00 Dan Carpenter <dan.carpenter@xxxxxxxxxx>:
> On Sun, Aug 10, 2014 at 01:49:12AM +0200, Rickard Strandqvist wrote:
>> Added a guaranteed null-terminate after call to strncpy.
>
> No.  This is a problem in the static checker and not in the code.
>
> Look at the start of the function.  This stuff should be obvious for the
> static checker.
>
> regards,
> dan carpenter
>

Hi Dan

Okay, no, it was me who missed it, not cppcheck.

Ensuring that from string will fit was an unusual solution.
If I see code where an effort is made to ensure that no more than x
characters copied I react to it.
But it is zeroing of the string you were looking for then. Ok sorry :-(

Kind regards
Rickard Strandqvist
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux