From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
"Denis V . Lunev" <den@openvz.org>,
"Kevin Wolf" <kwolf@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Eric Blake" <eblake@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-devel] [PATCH for-2.9] block/parallels: Avoid overflows
Date: Mon, 3 Apr 2017 15:03:40 +0200 [thread overview]
Message-ID: <c38b9069-a2e9-961a-6201-c44b25a5c906@redhat.com> (raw)
In-Reply-To: <20170331170512.10381-1-mreitz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 776 bytes --]
On 31.03.2017 19:05, Max Reitz wrote:
> Change the types of variables in allocate_clusters() to int64_t so we do
> not have to worry about potential overflows.
>
> Add an assertion that our accesses to s->bat[] do not result in a buffer
> overflow and that the implicit conversion performed when invoking
> bat_entry_off() does not result in an integer overflow.
>
> Coverity-id: 1307776
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> This supercedes Peter's patch "block/parallels.c: avoid integer overflow
> in allocate_clusters()".
> ---
> block/parallels.c | 19 +++++++++++++------
> 1 file changed, 13 insertions(+), 6 deletions(-)
Thanks for reviewing, applied to my block branch:
https://github.com/XanClic/qemu/commits/block
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
prev parent reply other threads:[~2017-04-03 13:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 17:05 [Qemu-devel] [PATCH for-2.9] block/parallels: Avoid overflows Max Reitz
2017-03-31 18:33 ` Eric Blake
2017-03-31 20:31 ` Philippe Mathieu-Daudé
2017-04-03 13:03 ` Max Reitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c38b9069-a2e9-961a-6201-c44b25a5c906@redhat.com \
--to=mreitz@redhat.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=f4bug@amsat.org \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).