Re: [PATCH 1/5] string.h: Introduce memtostr() and memtostr_pad()

2024-04-24 Thread Martin K. Petersen
Kees, > As the string KUnit tests have seen some refactoring, I'm taking this > patch and refactoring it onto my tree. Once the SCSI fixes are > reviewed, if we want to land them in -next, it's probably easiest for > them to go via my tree. Sure, no problem. -- Martin K. Petersen Oracle

Re: [PATCH 1/5] string.h: Introduce memtostr() and memtostr_pad()

2024-04-24 Thread Kees Cook
On Tue, Apr 09, 2024 at 07:31:50PM -0700, Kees Cook wrote: > Another ambiguous use of strncpy() is to copy from strings that may not > be NUL-terminated. These cases depend on having the destination buffer > be explicitly larger than the source buffer's maximum size, having > the size of the copy e

Re: [PATCH 1/5] string.h: Introduce memtostr() and memtostr_pad()

2024-04-10 Thread Kees Cook
On Wed, Apr 10, 2024 at 07:08:10AM +0300, Andy Shevchenko wrote: > On Wed, Apr 10, 2024 at 5:31 AM Kees Cook wrote: > > > > Another ambiguous use of strncpy() is to copy from strings that may not > > be NUL-terminated. These cases depend on having the destination buffer > > be explicitly larger th

Re: [PATCH 1/5] string.h: Introduce memtostr() and memtostr_pad()

2024-04-09 Thread Andy Shevchenko
On Wed, Apr 10, 2024 at 5:31 AM Kees Cook wrote: > > Another ambiguous use of strncpy() is to copy from strings that may not > be NUL-terminated. These cases depend on having the destination buffer > be explicitly larger than the source buffer's maximum size, having > the size of the copy exactly