Re: [PATCH v2] scsi: zfcp: Replace strlcpy() with strscpy()

2023-12-13 Thread Martin K. Petersen
On Thu, 30 Nov 2023 12:41:00 -0800, Kees Cook wrote: > strlcpy() reads the entire source buffer first. This read may exceed > the destination size limit. This is both inefficient and can lead > to linear read overflows if a source string is not NUL-terminated[1]. > Additionally, it returns the siz

Re: [PATCH v2] scsi: zfcp: Replace strlcpy() with strscpy()

2023-12-05 Thread Martin K. Petersen
Kees, > strlcpy() reads the entire source buffer first. This read may exceed > the destination size limit. This is both inefficient and can lead to > linear read overflows if a source string is not NUL-terminated[1]. > Additionally, it returns the size of the source string, not the > resulting s

Re: [PATCH v2] scsi: zfcp: Replace strlcpy() with strscpy()

2023-12-04 Thread Benjamin Block
Hello Kees, Martin, James, On Thu, Nov 30, 2023 at 12:41:00PM -0800, Kees Cook wrote: > strlcpy() reads the entire source buffer first. This read may exceed > the destination size limit. This is both inefficient and can lead > to linear read overflows if a source string is not NUL-terminated[1]. >

[PATCH v2] scsi: zfcp: Replace strlcpy() with strscpy()

2023-11-30 Thread Kees Cook
strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated[1]. Additionally, it returns the size of the source string, not the resulting size of the destinat