summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-09-22 12:29:40 -0700
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-10-07 03:37:04 +0200
commitbb02dcf2d4c0ec446fb53516eea76087f8b7a3ed (patch)
treeb5313e746f84f4e2507c816312fa0ac176763ce1 /include
parent6feb119d32ed1b8853e407495fad33795b9c2137 (diff)
downloadfocaccia-qemu-bb02dcf2d4c0ec446fb53516eea76087f8b7a3ed.tar.gz
focaccia-qemu-bb02dcf2d4c0ec446fb53516eea76087f8b7a3ed.zip
system/memory: Split address_space_write_rom_internal
In 2dbaf58bbe7 we conditionally skipped the increment
of buf because ubsan warns incrementing NULL, and buf
is always NULL for FLUSH_CACHE.  However, the existence
of the test for NULL caused Coverity to warn that the
memcpy in the WRITE_DATA case lacked a test for NULL.

Duplicate address_space_write_rom_internal into the two
callers, dropping enum write_rom_type, and simplify.
This eliminates buf in the flush case, and eliminates
the conditional increment of buf in the write case.

Coverity: CID 1621220
Fixes: 2dbaf58bbe7 ("system/physmem: Silence warning from ubsan")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250922192940.2908002-1-richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions