Re: [PATCH] scsi: ibmvfc: replace deprecated strncpy with strscpy

2023-12-13 Thread Martin K. Petersen
On Mon, 30 Oct 2023 19:04:33 +, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We expect these fields to be NUL-terminated as the property names from >

Re: [PATCH] scsi: ibmvfc: replace deprecated strncpy with strscpy

2023-12-05 Thread Martin K. Petersen
Kees, > On Mon, Oct 30, 2023 at 07:04:33PM +, Justin Stitt wrote: >> strncpy() is deprecated for use on NUL-terminated destination strings >> [1] and as such we should prefer more robust and less ambiguous string >> interfaces. > Yeah, this conversion looks correct to me too. > >

Re: [PATCH] scsi: ibmvfc: replace deprecated strncpy with strscpy

2023-11-30 Thread Kees Cook
On Mon, Oct 30, 2023 at 07:04:33PM +, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We expect these fields to be NUL-terminated as the property names from >

[PATCH] scsi: ibmvfc: replace deprecated strncpy with strscpy

2023-10-30 Thread Justin Stitt
strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect these fields to be NUL-terminated as the property names from which they are derived are also NUL-terminated. Moreover, NUL-padding is