On Fri, 2026-10-02 at 22:02 +0800, Tao Ding wrote: > Use hwaddr for address calculations to avoid 32-bit overflow. > > Resolves: Coverity CID 1685515 > > Reported-by: Alistair Francis <[email protected]> > Signed-off-by: Tao Ding <[email protected]>
Reviewed-by: Alistair Francis <[email protected]> Alistair > --- > hw/misc/k230_decomp_gzip.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/misc/k230_decomp_gzip.c b/hw/misc/k230_decomp_gzip.c > index 0d8a3b2d2e..ac06cc1571 100644 > --- a/hw/misc/k230_decomp_gzip.c > +++ b/hw/misc/k230_decomp_gzip.c > @@ -53,7 +53,7 @@ static bool > k230_decomp_gzip_write_mem(K230DecompGzipState *s, hwaddr addr, > static hwaddr k230_decomp_gzip_output_addr(K230DecompGzipState *s) > { > return K230_DECOMP_GZIP_SRAM_OUT_BASE + > - s->output.slot * K230_DECOMP_GZIP_BLOCK_SIZE + > + (hwaddr) s->output.slot * K230_DECOMP_GZIP_BLOCK_SIZE + > s->output.current_offset; > } >
