diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2025-09-22 12:29:40 -0700 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-10-07 03:37:04 +0200 |
| commit | bb02dcf2d4c0ec446fb53516eea76087f8b7a3ed (patch) | |
| tree | b5313e746f84f4e2507c816312fa0ac176763ce1 /include | |
| parent | 6feb119d32ed1b8853e407495fad33795b9c2137 (diff) | |
| download | focaccia-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