Re: [PATCH v3] null_blk: replace strncpy with strscpy

2023-10-03 Thread Jens Axboe
On Tue, 19 Sep 2023 05:30:35 +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should favor a more robust and less ambiguous interface. > > We expect that both `nullb->disk_name` and `disk->disk_name` be > NUL-terminated: > | snpr

Re: [PATCH v3] null_blk: replace strncpy with strscpy

2023-10-03 Thread Kees Cook
On Tue, Sep 19, 2023 at 05:30:35AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should favor a more robust and less ambiguous interface. > > We expect that both `nullb->disk_name` and `disk->disk_name` be > NUL-terminated: > |

Re: [PATCH v3] null_blk: replace strncpy with strscpy

2023-09-20 Thread Kees Cook
On Tue, Sep 19, 2023 at 05:30:35AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should favor a more robust and less ambiguous interface. > > We expect that both `nullb->disk_name` and `disk->disk_name` be > NUL-terminated: > |

[PATCH v3] null_blk: replace strncpy with strscpy

2023-09-18 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. We should favor a more robust and less ambiguous interface. We expect that both `nullb->disk_name` and `disk->disk_name` be NUL-terminated: | snprintf(nullb->disk_name, sizeof(nullb->disk_name), | "%s", co