Re: [Qemu-devel] Re: [PATCH RESEND 2/2] vnc: Fix heap corruption

2011-03-02 Thread Wen Congyang
At 03/03/2011 06:27 AM, Stefan Weil Write: > Am 02.03.2011 23:01, schrieb Stefan Weil: >> Am 02.03.2011 19:47, schrieb Peter Maydell: >>> On 2 March 2011 18:36, Stefan Weil wrote: No. I dont't think that the third parameter of bitmap_clear is ok like that. See my patch for the correct va

Re: [Qemu-devel] Re: [PATCH RESEND 2/2] vnc: Fix heap corruption

2011-03-02 Thread Peter Maydell
On 2 March 2011 22:01, Stefan Weil wrote: > The part missing in my patch is correct handling of another > rounding effect: > > VNC_DIRTY_WORDS is exact for 32 bit long values (and the > "old" code which used uint32_t until some weeks ago), where > VNC_DIRTY_WORDS = 2560/16/32 = 5. > > For 64 bit v

Re: [Qemu-devel] Re: [PATCH RESEND 2/2] vnc: Fix heap corruption

2011-03-02 Thread Stefan Weil
Am 02.03.2011 23:01, schrieb Stefan Weil: Am 02.03.2011 19:47, schrieb Peter Maydell: On 2 March 2011 18:36, Stefan Weil wrote: No. I dont't think that the third parameter of bitmap_clear is ok like that. See my patch for the correct value. Wen's patch: + const size_t width = ds_get_width(v

Re: [Qemu-devel] Re: [PATCH RESEND 2/2] vnc: Fix heap corruption

2011-03-02 Thread Stefan Weil
Am 02.03.2011 19:47, schrieb Peter Maydell: On 2 March 2011 18:36, Stefan Weil wrote: No. I dont't think that the third parameter of bitmap_clear is ok like that. See my patch for the correct value. Wen's patch: + const size_t width = ds_get_width(vd->ds) / 16; [...] -bitmap_set(width_ma

Re: [Qemu-devel] Re: [PATCH RESEND 2/2] vnc: Fix heap corruption

2011-03-02 Thread Peter Maydell
On 2 March 2011 18:36, Stefan Weil wrote: > No. I dont't think that the third parameter of bitmap_clear is > ok like that. See my patch for the correct value. Wen's patch: +const size_t width = ds_get_width(vd->ds) / 16; [...] -    bitmap_set(width_mask, 0, (ds_get_width(vd->ds) / 16)); -