diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-08-11 11:31:08 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-09-02 17:57:05 +0200 |
| commit | 7baa9c39fc3d525216f0cedcfda5374c26d50e80 (patch) | |
| tree | d7d3411ad7643b88cc4d7aaf7d09fc9fdb7a530b /rust/qemu-api/src/module.rs | |
| parent | c5ade4f9d289fed61df7a04950f8f607e26353e6 (diff) | |
| download | focaccia-qemu-7baa9c39fc3d525216f0cedcfda5374c26d50e80.tar.gz focaccia-qemu-7baa9c39fc3d525216f0cedcfda5374c26d50e80.zip | |
hw/scsi/mptsas: Avoid silent integer truncation in MPI_FUNC_IOC_INIT
For the MaxDevices 8-bit field of the request / response structures of the MPI_FUNCTION_IOC_INIT command, the 0x00 value means "max 256 devices". This is not a problem because when max_devices=256, its value (0x100), being casted to a uint8_t, is truncated to 0x00. However Coverity complains for an "Overflowed constant". Fix by re-using the request fields in the response, since they are not modified and use the same types. Fix: Coverity 1547736 (Overflowed constant) Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20250811095550.93655-1-philmd@linaro.org>
Diffstat (limited to 'rust/qemu-api/src/module.rs')
0 files changed, 0 insertions, 0 deletions