commit | b6014c5089a313ac84fe74970eee56e3fc87b49b | [log] [tgz] |
---|---|---|
author | Akihiko Odaki <akihiko.odaki@daynix.com> | Wed Jan 08 20:31:46 2025 +0900 |
committer | David Woodhouse <dwmw@amazon.co.uk> | Thu Jan 09 10:43:13 2025 +0000 |
tree | 6fbe8e3b1bdefde9e6921ab25cd26f46f39cc393 | |
parent | 981780cdda5a60ae7ae319933673ff9475245965 [diff] |
hw/xen: Check if len is 0 before memcpy() data->data can be NULL when len is 0. Strictly speaking, the behavior of memcpy() in such a scenario is undefined so UBSan complaints. Satisfy UBSan by checking if len is 0 before memcpy(). Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>