qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1] ui: correctly advance output buffer when wri


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v1] ui: correctly advance output buffer when writing SASL data
Date: Thu, 1 Feb 2018 10:03:23 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 02/01/2018 09:58 AM, Daniel P. Berrangé wrote:
> In this previous commit:
> 
>   commit 8f61f1c5a6bc06438a1172efa80bc7606594fa07
>   Author: Daniel P. Berrange <address@hidden>
>   Date:   Mon Dec 18 19:12:20 2017 +0000
> 
>     ui: track how much decoded data we consumed when doing SASL encoding
> 
> I attempted to fix a flaw with tracking how much data had actually been
> processed when encoding with SASL. With that flaw, the VNC server could
> mistakenly discard queued data that had not been sent.
> 
> The fix was not quite right though, because it merely decremented the
> vs->output.offset value. This is effectively to discarding data from the

s/to //

> end of the pending output buffer. We actually need to discard data from
> the start of the pending output buffer. We also want to free memory that
> is no longer required. The correct way to handle this is to use the
> buffer_advance() helper method instead of directly manipulating the
> offset value.
> 
> Reported-by: Laszlo Ersek <address@hidden>
> Signed-off-by: Daniel P. Berrangé <address@hidden>
> ---
>  ui/vnc-auth-sasl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]