On Fri, Sep 15, 2023 at 09:36:23AM +0200, David Rheinsberg wrote:
> Hi
>
> On Fri, Sep 15, 2023, at 7:13 AM, Kees Cook wrote:
> >> - /* @hid is zero-initialized, strncpy() is correct, strlcpy() not */
> >> - len = min(sizeof(hid->name), sizeof(ev->u.create2.name)) - 1;
> >> - strncpy(hid->name,
Hi
On Fri, Sep 15, 2023, at 7:13 AM, Kees Cook wrote:
>> -/* @hid is zero-initialized, strncpy() is correct, strlcpy() not */
>> -len = min(sizeof(hid->name), sizeof(ev->u.create2.name)) - 1;
>> -strncpy(hid->name, ev->u.create2.name, len);
>> -len = min(sizeof(hid->phys), sizeof(e
On Thu, Sep 14, 2023 at 10:47:21PM +, Justin Stitt wrote:
> `strncpy` is deprecated for use on NUL-terminated destination strings [1].
>
> We should prefer more robust and less ambiguous string interfaces.
>
> A suitable replacement is `strscpy` [2] due to the fact that it
> guarantees NUL-te
`strncpy` is deprecated for use on NUL-terminated destination strings [1].
We should prefer more robust and less ambiguous string interfaces.
A suitable replacement is `strscpy` [2] due to the fact that it
guarantees NUL-termination on the destination buffer without
unnecessarily NUL-padding.
Lo
4 matches
Mail list logo