Re: [Qemu-devel] [PATCH 1/2] qcow2: Do not overflow when writing an L1 sector

2014-10-19 Thread Peter Lieven
On 16.10.2014 15:25, Max Reitz wrote: While writing an L1 table sector, qcow2_write_l1_entry() copies the respective range from s->l1_table to the local "buf" array. The size of s->l1_table does not have to be a multiple of L1_ENTRIES_PER_SECTOR; thus, limit the index which is used for copying al

[Qemu-devel] [PATCH 1/2] qcow2: Do not overflow when writing an L1 sector

2014-10-16 Thread Max Reitz
While writing an L1 table sector, qcow2_write_l1_entry() copies the respective range from s->l1_table to the local "buf" array. The size of s->l1_table does not have to be a multiple of L1_ENTRIES_PER_SECTOR; thus, limit the index which is used for copying all entries to the L1 size. Cc: qemu-sta.