diff options
author | Minwoo Im <minwoo.im.dev@gmail.com> | 2024-06-23 11:45:55 +0900 |
---|---|---|
committer | Jeuk Kim <jeuk20.kim@samsung.com> | 2024-06-30 12:44:32 +0900 |
commit | e12b11f6f29272ee31ccde6b0db1a10139e87083 (patch) | |
tree | 69874baaafe6b580fdaf1d36a5dc1837b12bd0f9 /scripts/qapi/parser.py | |
parent | 3665dd6bb9043bef181c91e2dce9e1efff47ed51 (diff) | |
download | qemu-e12b11f6f29272ee31ccde6b0db1a10139e87083.zip qemu-e12b11f6f29272ee31ccde6b0db1a10139e87083.tar.gz qemu-e12b11f6f29272ee31ccde6b0db1a10139e87083.tar.bz2 |
hw/ufs: Fix potential bugs in MMIO read|write
This patch fixes two points reported in coverity scan report [1]. Check
the MMIO access address with (addr + size), not just with the start offset
addr to make sure that the requested memory access not to exceed the
actual register region. We also updated (uint8_t *) to (uint32_t *) to
represent we are accessing the MMIO registers by dword-sized only.
[1] https://lore.kernel.org/qemu-devel/CAFEAcA82L-WZnHMW0X+Dr40bHM-EVq2ZH4DG4pdqop4xxDP2Og@mail.gmail.com/
Cc: Jeuk Kim <jeuk20.kim@gmail.com>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20240623024555.78697-1-minwoo.im.dev@gmail.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
Diffstat (limited to 'scripts/qapi/parser.py')
0 files changed, 0 insertions, 0 deletions