qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/ppc: ppc440_uc: avoid multiply overflow in dcr_write_dma(


From: BALATON Zoltan
Subject: Re: [PATCH] hw/ppc: ppc440_uc: avoid multiply overflow in dcr_write_dma()
Date: Sat, 6 Aug 2022 13:22:25 +0200 (CEST)

On Sat, 6 Aug 2022, Daniel Henrique Barboza wrote:
Balaton,

I had a change of heart. The code is too clear that it won't overflow.
It felt overkill changing var types just for that.

Peter already marked it as Ignored - False Positive in Coverity as well.
So this would be a code change to "look better". It didn't look particularly
better after the changes I was about to send, so let's forget about it.

Fine with me. I may look at it later when Peter's second patch changing this code lands if there are any cleanups possible, I've noticed that now that we have xferlen = count * width it could be used elsewehere where that product appears for example. At that point I'll see if the type can be changed too. Until then it's fine as it is now.

Regards,
BALATON Zoltan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]