7cf745dd9c
In rocker_port_phys_link_status() and rocker_port_phys_enable_read() we construct a 64-bit value with one bit per front-panel port. However we accidentally do the shift as 32-bit arithmetic, which means that if there are more than 31 front-panel ports this is undefined behaviour. Fix the problem by ensuring we use 64-bit arithmetic for the whole calculation. (We won't ever shift off the 64-bit value because ROCKER_FP_PORTS_MAX is 62.) Resolves: Coverity CID 1487121, 1487160 Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com> |
||
---|---|---|
.. | ||
qmp-norocker.c | ||
rocker_desc.c | ||
rocker_desc.h | ||
rocker_fp.c | ||
rocker_fp.h | ||
rocker_hw.h | ||
rocker_of_dpa.c | ||
rocker_of_dpa.h | ||
rocker_tlv.h | ||
rocker_world.c | ||
rocker_world.h | ||
rocker.c | ||
rocker.h |