qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerhard Wiesinger <lists@wiesinger.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC
Date: Sun, 04 Nov 2012 11:28:32 +0100	[thread overview]
Message-ID: <50964350.5070701@wiesinger.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1211012105080.690@bbs.intern>

Ping?

On 01.11.2012 21:06, Gerhard Wiesinger wrote:
> Fix crash with VNC under NT 4.0 and VMWare VGA and window which is 
> outside of the visible area.
>
> Backtrace:
> #0  set_bit (addr=<optimized out>, nr=-3) at ./bitops.h:122
> #1  vnc_dpy_update (ds=<optimized out>, x=-48, y=145, w=57, h=161) at 
> ui/vnc.c:452
> #2  0x00007f1ce057e2ec in dpy_update (s=0x7f1ce1c8c880, h=16, w=66, 
> y=145, x=-57) at ./console.h:242
> #3  vmsvga_update_rect (h=16, w=66, y=145, x=-57, s=0x7f1ce1cb3dd0) at 
> hw/vmware_vga.c:324
> #4  vmsvga_update_rect_flush (s=0x7f1ce1cb3dd0) at hw/vmware_vga.c:357
> #5  vmsvga_update_display (opaque=0x7f1ce1cb3dd0) at hw/vmware_vga.c:960
> #6  0x00007f1ce05f0b37 in vnc_refresh (opaque=0x7f1cd8526010) at 
> ui/vnc.c:2590
> #7  0x00007f1ce05c002b in qemu_run_timers (clock=0x7f1ce1c4f910) at 
> qemu-timer.c:392
> #8  qemu_run_timers (clock=0x7f1ce1c4f910) at qemu-timer.c:373
> #9  0x00007f1ce05c028d in qemu_run_all_timers () at qemu-timer.c:449
> #10 0x00007f1ce058f2ee in main_loop_wait (nonblocking=<optimized out>) 
> at main-loop.c:502
> #11 0x00007f1ce047acb3 in main_loop () at vl.c:1655
> #12 main (argc=<optimized out>, argv=<optimized out>, envp=<optimized 
> out>) at vl.c:3826
>
> Signed-off-by: Gerhard Wiesinger <lists@wiesinger.com>
> ---
>  ui/vnc.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 7c120e6..ae6d819 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -453,6 +453,11 @@ static void vnc_dpy_update(DisplayState *ds, int 
> x, int y, int w, int h)
>      w = MIN(x + w, width) - x;
>      h = MIN(h, height);
>
> +    x = MAX(x, 0);
> +    y = MAX(y, 0);
> +    w = MAX(w, 0);
> +    h = MAX(h, 0);
> +
>      for (; y < h; y++)
>          for (i = 0; i < w; i += 16)
>              set_bit((x + i) / 16, s->dirty[y]);

  reply	other threads:[~2012-11-04 10:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 20:06 [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC Gerhard Wiesinger
2012-11-04 10:28 ` Gerhard Wiesinger [this message]
2012-11-08 18:53   ` Gerhard Wiesinger
2012-11-08 19:09 ` Peter Maydell
2012-11-08 21:07   ` Gerd Hoffmann
2012-11-08 23:55     ` BALATON Zoltan
2012-11-09  9:00       ` Michael Tokarev
2012-11-09  9:06         ` Michael Tokarev
2012-11-09  7:13     ` Gerhard Wiesinger
2012-11-09  7:18       ` Peter Maydell
2012-11-09  9:42         ` Anthony Liguori
2012-11-09  9:50           ` Peter Maydell
2012-11-09 13:31             ` Gerd Hoffmann
2012-11-09 23:45               ` Marek Vasut
2012-11-09 23:52                 ` Peter Maydell
2012-11-10  7:45                   ` Gerhard Wiesinger
2012-11-10 16:54                     ` Marek Vasut
2012-11-12  9:38                       ` Gerd Hoffmann
2012-11-12  9:33                 ` Gerd Hoffmann
2012-11-12 11:45                   ` BALATON Zoltan
2012-11-10 13:47       ` Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50964350.5070701@wiesinger.com \
    --to=lists@wiesinger.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).