Re: [Qemu-devel] [PATCH for-2.11 4/5] qcow2: Add bounds check to get_refblock_offset()

2017-11-14 Thread Max Reitz
On 2017-11-14 16:38, Alberto Garcia wrote: > On Tue 14 Nov 2017 04:27:56 PM CET, Max Reitz wrote: +static int64_t get_refblock_offset(BlockDriverState *bs, uint64_t offset) +{ +BDRVQcow2State *s = bs->opaque; +uint32_t index = offset_to_reftable_index(s, offset); +

Re: [Qemu-devel] [PATCH for-2.11 4/5] qcow2: Add bounds check to get_refblock_offset()

2017-11-14 Thread Alberto Garcia
On Tue 14 Nov 2017 04:27:56 PM CET, Max Reitz wrote: >>> +static int64_t get_refblock_offset(BlockDriverState *bs, uint64_t offset) >>> +{ >>> +BDRVQcow2State *s = bs->opaque; >>> +uint32_t index = offset_to_reftable_index(s, offset); >>> +int64_t covering_refblock_offset = 0; >>> +

Re: [Qemu-devel] [PATCH for-2.11 4/5] qcow2: Add bounds check to get_refblock_offset()

2017-11-14 Thread Max Reitz
On 2017-11-14 16:02, Alberto Garcia wrote: > On Fri 10 Nov 2017 09:31:10 PM CET, Max Reitz wrote: >> +static int64_t get_refblock_offset(BlockDriverState *bs, uint64_t offset) >> +{ >> +BDRVQcow2State *s = bs->opaque; >> +uint32_t index = offset_to_reftable_index(s, offset); >> +

Re: [Qemu-devel] [PATCH for-2.11 4/5] qcow2: Add bounds check to get_refblock_offset()

2017-11-14 Thread Alberto Garcia
On Fri 10 Nov 2017 09:31:10 PM CET, Max Reitz wrote: > +static int64_t get_refblock_offset(BlockDriverState *bs, uint64_t offset) > +{ > +BDRVQcow2State *s = bs->opaque; > +uint32_t index = offset_to_reftable_index(s, offset); > +int64_t covering_refblock_offset = 0; > + > +if

Re: [Qemu-devel] [PATCH for-2.11 4/5] qcow2: Add bounds check to get_refblock_offset()

2017-11-10 Thread Eric Blake
On 11/10/2017 02:31 PM, Max Reitz wrote: > Reported-by: R. Nageswara Sastry > Buglink: https://bugs.launchpad.net/qemu/+bug/1728661 > Signed-off-by: Max Reitz > --- > block/qcow2.h | 6 -- > block/qcow2-refcount.c | 26

[Qemu-devel] [PATCH for-2.11 4/5] qcow2: Add bounds check to get_refblock_offset()

2017-11-10 Thread Max Reitz
Reported-by: R. Nageswara Sastry Buglink: https://bugs.launchpad.net/qemu/+bug/1728661 Signed-off-by: Max Reitz --- block/qcow2.h | 6 -- block/qcow2-refcount.c | 26 +- tests/qemu-iotests/060 | 46