[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH] block/parallels.c: avoid integer o
From: |
Peter Maydell |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH] block/parallels.c: avoid integer overflow in allocate_clusters() |
Date: |
Fri, 31 Mar 2017 14:28:35 +0100 |
On 31 March 2017 at 14:27, Philippe Mathieu-Daudé <address@hidden> wrote:
> Eduardo you seem skilled regarding Coccinelle scripts, is it possible to
> write one to find those overflows?
This is the final one that Coverity reports on the current
codebase.
> Peter having one more macro might help or confuses more?
>
> #define MULTIPLY64(a32, b32) ((int64_t)a32 * b32)
We've fixed them with casts generally in the past.
thanks
-- PMM