[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] xen-disk: use g_malloc0 to fix build
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] xen-disk: use g_malloc0 to fix build |
Date: |
Fri, 28 Jul 2017 18:35:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Olaf Hering <address@hidden> writes:
> On Fri, Jul 28, Eric Blake wrote:
>
>> This version is prone to multiplication overflow (well, maybe not, but
>> you have to audit for that). Wouldn't it be better to use:
>
> What could go wrong?
> qemu will die either way, I think.
An overflow in the size argument of malloc(), realloc(), etc. is a heap
overrun waiting to happen.