Re: [PATCH 3/5] scsi: mpt3sas: Avoid possible run-time warning with long manufacturer strings

2024-05-21 Thread Ewan Milne
On Tue, Apr 9, 2024 at 10:32 PM Kees Cook wrote: > > The prior strscpy() replacement of strncpy() here expected the > manufacture_reply strings to be NUL-terminated, but it is possible > they are not, as the code pattern here shows, e.g., edev->vendor_id > being exactly 1 character larger than

[PATCH 3/5] scsi: mpt3sas: Avoid possible run-time warning with long manufacturer strings

2024-04-09 Thread Kees Cook
The prior strscpy() replacement of strncpy() here expected the manufacture_reply strings to be NUL-terminated, but it is possible they are not, as the code pattern here shows, e.g., edev->vendor_id being exactly 1 character larger than manufacture_reply->vendor_id, and the replaced strncpy() was