Re: [PATCH] scsi: mpt2sas: mpt2sas_base.c: Cleaning up missing null-terminate after strncpy call

2014-06-06 Thread Rickard Strandqvist
Hi I did not know that Linux had strlcpy, much better choice, of course! It was not clear that this was done in the code. And my thought was, rather, just that you were not sure if there was a null character because it used strlcpy. if this can not possibly happen would be almost as well to switc

Re: [PATCH] scsi: mpt2sas: mpt2sas_base.c: Cleaning up missing null-terminate after strncpy call

2014-06-04 Thread James Bottomley
On Wed, 2014-06-04 at 23:36 +0200, Rickard Strandqvist wrote: > Added a guaranteed null-terminate after call to strncpy. > > This was partly found using a static code analysis program called cppcheck. > > Signed-off-by: Rickard Strandqvist > --- > drivers/scsi/mpt2sas/mpt2sas_base.c |3 ++-

Re: [PATCH] scsi: mpt2sas: mpt2sas_base.c: Cleaning up missing null-terminate after strncpy call

2014-06-04 Thread Rickard Strandqvist
Hi A little embarrassing, but I actually did not know that there was a better replacement for strncpy. Sorry, but I will send a new platch based on strlcpy instead then. Will investigate cover letter then to. Best regards Rickard Strandqvist 2014-06-05 0:01 GMT+02:00 Joe Perches : > On Wed,

Re: [PATCH] scsi: mpt2sas: mpt2sas_base.c: Cleaning up missing null-terminate after strncpy call

2014-06-04 Thread Joe Perches
On Wed, 2014-06-04 at 23:36 +0200, Rickard Strandqvist wrote: > Added a guaranteed null-terminate after call to strncpy. Next time you submit a patch series like this can you please use a cover letter? That way I can reply to the cover letter with a comment about the series instead of multiple re

[PATCH] scsi: mpt2sas: mpt2sas_base.c: Cleaning up missing null-terminate after strncpy call

2014-06-04 Thread Rickard Strandqvist
Added a guaranteed null-terminate after call to strncpy. This was partly found using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/scsi/mpt2sas/mpt2sas_base.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/m