linux/drivers/cdx/controller
Thorsten Blum 5ed0465d7c cdx: Fix off-by-one error in cdx_rpmsg_probe()
commit 300a0cfe9f upstream.

In cdx_rpmsg_probe(), strscpy() is incorrectly called with the length of
the source string (excluding the NUL terminator) rather than the size of
the destination buffer. This results in one character less being copied
from 'cdx_rpmsg_id_table[0].name' to 'chinfo.name'.

Use the destination buffer size instead to ensure the name is copied
correctly.

Cc: stable <stable@kernel.org>
Fixes: 2a226927d9 ("cdx: add rpmsg communication channel for CDX")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20250806090512.121260-2-thorsten.blum@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-08-28 16:31:09 +02:00
..
bitfield.h cdx: add MCDI protocol interface for firmware interaction 2023-03-29 12:26:32 +02:00
cdx_controller.c cdx: Convert to platform remove callback returning void 2024-04-13 12:41:01 +02:00
cdx_controller.h cdx: add rpmsg communication channel for CDX 2023-03-29 12:26:32 +02:00
cdx_rpmsg.c cdx: Fix off-by-one error in cdx_rpmsg_probe() 2025-08-28 16:31:09 +02:00
Kconfig cdx: add MSI support for CDX bus 2024-03-07 21:52:03 +00:00
Makefile cdx: add rpmsg communication channel for CDX 2023-03-29 12:26:32 +02:00
mc_cdx_pcol.h cdx: add MSI support for CDX bus 2024-03-07 21:52:03 +00:00
mcdi.c cdx: remove unused struct 'cdx_mcdi_copy_buffer' 2024-07-31 13:56:50 +02:00
mcdi.h cdx: Replace custom mcdi logging with print_hex_dump_debug() 2023-06-15 13:42:16 +02:00
mcdi_functions.c cdx: add MSI support for CDX bus 2024-03-07 21:52:03 +00:00
mcdi_functions.h cdx: add MSI support for CDX bus 2024-03-07 21:52:03 +00:00