hw/cxl: Fix handling of component ID to not assume it is a string
Add following fixes, 1. Coverity reports a warning (CID 1645325) for use of strncpy() in handling of component ID. In cxl_create_mem_sparing_event_records(), fix handling of component ID to not assume it is a string by replacing strncpy with memcpy to solve this warning and copy the entire component ID data, which is 16 bytes. 2. In cxl_maintenance_insert(), - replace strncpy with memcpy to copy full data because component ID, which is 16 bytes data. - remove memset which is not required. Closes ("https://lore.kernel.org/qemu-devel/CAFEAcA_CsVe4TUVm3o_-BA4hXvi2xAThGX5T97amgTQKW_kiYA@mail.gmail.com/") Fixes: 5e5a86bab830("hw/cxl: Add support for Maintenance command and Post Package Repair (PPR)") Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Shiju Jose <shiju.jose@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20260306101423.986-2-shiju.jose@huawei.com>