[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio c
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active |
Date: |
Thu, 18 Jan 2018 13:29:35 +0000 |
On 12 January 2018 at 12:58, Gerd Hoffmann <address@hidden> wrote:
> From: "Daniel P. Berrange" <address@hidden>
>
> The VNC server must throttle data sent to the client to prevent the 'output'
> buffer size growing without bound, if the client stops reading data off the
> socket (either maliciously or due to stalled/slow network connection).
Hi. Coverity (CID 1385147) complains about a suspicious sign extension
in this patch:
> +/*
> + * Figure out how much pending data we should allow in the output
> + * buffer before we throttle incremental display updates, and/or
> + * drop audio samples.
> + *
> + * We allow for equiv of 1 full display's worth of FB updates,
> + * and 1 second of audio samples. If audio backlog was larger
> + * than that the client would already suffering awful audio
> + * glitches, so dropping samples is no worse really).
> + */
> +static void vnc_update_throttle_offset(VncState *vs)
> +{
> + size_t offset =
> + vs->client_width * vs->client_height * vs->client_pf.bytes_per_pixel;
because the multiply is done with the "int" type, and then may
be sign-extended when converted to the probably-64-bit unsigned
size_t, resulting in the high bits all being set if the
multiply ended up with a 1 in bit 31.
thanks
-- PMM
- [Qemu-devel] [PULL 02/14] ui: remove 'sync' parameter from vnc_update_client, (continued)
- [Qemu-devel] [PULL 02/14] ui: remove 'sync' parameter from vnc_update_client, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 01/14] vnc: fix debug spelling, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 09/14] ui: refactor code for determining if an update should be sent to the client, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 13/14] ui: add trace events related to VNC client throttling, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 12/14] ui: place a hard cap on VNC server output buffer size, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 06/14] ui: track how much decoded data we consumed when doing SASL encoding, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 14/14] ui: mix misleading comments & return types of VNC I/O helper methods, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active, Gerd Hoffmann, 2018/01/12
- Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active,
Peter Maydell <=
- Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active, Daniel P. Berrange, 2018/01/18
- Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active, Paolo Bonzini, 2018/01/18
- Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active, Daniel P. Berrange, 2018/01/18
- Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active, Paolo Bonzini, 2018/01/18
- Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active, Peter Maydell, 2018/01/18
- Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active, Paolo Bonzini, 2018/01/18
- Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active, Thomas Huth, 2018/01/18
- Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active, Paolo Bonzini, 2018/01/18
- Re: [Qemu-devel] [PULL 10/14] ui: fix VNC client throttling when audio capture is active, Gerd Hoffmann, 2018/01/25
[Qemu-devel] [PULL 11/14] ui: fix VNC client throttling when forced update is requested, Gerd Hoffmann, 2018/01/12