Re: [Qemu-block] [PATCH for 2.9] qcow2: avoid nb_sectors int overflow at zero/discard

2017-11-14 Thread Max Reitz
On 2017-10-24 10:56, Anton Nefedov wrote: > during discard, signed integer overflow leads to end_offset possibly > be less than offset, > that in turn makes nb_clusters (to discard) much bigger than expected, > leading to a possible data loss, operation taking very long and > image growing large

[Qemu-block] [PATCH for 2.9] qcow2: avoid nb_sectors int overflow at zero/discard

2017-10-24 Thread Anton Nefedov
during discard, signed integer overflow leads to end_offset possibly be less than offset, that in turn makes nb_clusters (to discard) much bigger than expected, leading to a possible data loss, operation taking very long and image growing large as discard will allocate L2 tables for all that huge