[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] vnc: tight: Fix crash after 2GB of output
From: |
Michael Tokarev |
Subject: |
Re: [Qemu-devel] [PATCH] vnc: tight: Fix crash after 2GB of output |
Date: |
Fri, 04 Mar 2011 14:46:39 +0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.16) Gecko/20101227 Icedove/3.0.11 |
04.03.2011 11:56, Corentin Chary wrote:
>>>
>>> bytes = zstream->total_out - previous_out;
>
> Good catch
>
>> total_out isn't used by zlib internally, so if the resulting
>> "total" counter is not needed in qemu, we can just zero-out
>> the total_out in this function before calling zlib, and
>> use the resulting value directly as "bytes", without
>> saving its previous value in previous_out. Something like
>> the attached patch does.
>
> If you're certain that total_out is not used by zlib, could you also
> send a patch for zlib encoding please ? (vnc-enc-zlib.c)
> Thanks,
Yes, I noticed this too (the same code is in enc-zlib), and mentioned
this in my previous email.
The attached slightly different patch fixes both places and fixes
them for good (hopefully anyway). Runtime-tested for the tight
case, but honestly, I didn't wait for 2G of output ;)
Thanks!
/mjt
fix-vnc-zlib-overflow.diff
Description: Text Data
- [Qemu-devel] [PATCH] vnc: tight: Fix crash after 2GB of output, Roland Dreier, 2011/03/03
- Re: [Qemu-devel] [PATCH] vnc: tight: Fix crash after 2GB of output, Michael Tokarev, 2011/03/04
- Re: [Qemu-devel] [PATCH] vnc: tight: Fix crash after 2GB of output, Corentin Chary, 2011/03/04
- Re: [Qemu-devel] [PATCH] vnc: tight: Fix crash after 2GB of output,
Michael Tokarev <=
- Re: [Qemu-devel] [PATCH] vnc: tight: Fix crash after 2GB of output, Corentin Chary, 2011/03/04
- [Qemu-devel] [PATCH][STABLE-0.14] vnc: tight: Fix crash after 2GB of output, Michael Tokarev, 2011/03/05
- [Qemu-devel] Re: [PATCH][STABLE-0.14] vnc: tight: Fix crash after 2GB of output, Corentin Chary, 2011/03/05
- Re: [Qemu-devel] Re: [PATCH][STABLE-0.14] vnc: tight: Fix crash after 2GB of output, Michael Tokarev, 2011/03/05
- Re: [Qemu-devel] Re: [PATCH][STABLE-0.14] vnc: tight: Fix crash after 2GB of output, Corentin Chary, 2011/03/05
Re: [Qemu-devel] [PATCH] vnc: tight: Fix crash after 2GB of output, Roland Dreier, 2011/03/04
Re: [Qemu-devel] [PATCH] vnc: tight: Fix crash after 2GB of output, Michael Tokarev, 2011/03/04