Re: [Qemu-devel] [PATCH for-2.9] block/parallels: Avoid overflows

2017-04-03 Thread Max Reitz
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 in

Re: [Qemu-devel] [PATCH for-2.9] block/parallels: Avoid overflows

2017-03-31 Thread Philippe Mathieu-Daudé
On 03/31/2017 02:05 PM, 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 invokin

Re: [Qemu-devel] [PATCH for-2.9] block/parallels: Avoid overflows

2017-03-31 Thread Eric Blake
On 03/31/2017 12:05 PM, 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

[Qemu-devel] [PATCH for-2.9] block/parallels: Avoid overflows

2017-03-31 Thread Max Reitz
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 int