[PATCH v2 5/5] vhost: use strlcpy instead of strncpy

Stephen Hemminger stephen at networkplumber.org
Tue Jan 14 18:42:39 CET 2025


On Thu, 19 Dec 2024 14:49:55 -0800
Stephen Hemminger <stephen at networkplumber.org> wrote:

> Some tools such as gcc address sanitizer will complain if strncpy
> is used to completely fill a string since it will not be null
> terminated. Since the previous code forced as null at end,
> use strlcpy() to get the same effect.
> 
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>

Recheck-request: iol-compile-amd64-testing


More information about the dev mailing list