Re: [PATCH 1/2] qcow2: Limit total allocation range to INT_MAX

2019-10-11 Thread Philippe Mathieu-Daudé
On 10/10/19 12:08 PM, Max Reitz wrote: When the COW areas are included, the size of an allocation can exceed INT_MAX. This is kind of limited by handle_alloc() in that it already caps avail_bytes at INT_MAX, but the number of clusters still reflects the original length. This can have all sorts

Re: [PATCH 1/2] qcow2: Limit total allocation range to INT_MAX

2019-10-10 Thread Eric Blake
On 10/10/19 5:08 AM, Max Reitz wrote: When the COW areas are included, the size of an allocation can exceed INT_MAX. This is kind of limited by handle_alloc() in that it already caps avail_bytes at INT_MAX, but the number of clusters still reflects the original length. This can have all sorts

[PATCH 1/2] qcow2: Limit total allocation range to INT_MAX

2019-10-10 Thread Max Reitz
When the COW areas are included, the size of an allocation can exceed INT_MAX. This is kind of limited by handle_alloc() in that it already caps avail_bytes at INT_MAX, but the number of clusters still reflects the original length. This can have all sorts of effects, ranging from the storage