qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH][UPDATED] Crop VNC update requests to avoid segf


From: Thomas Tuttle
Subject: Re: [Qemu-devel] [PATCH][UPDATED] Crop VNC update requests to avoid segfaults
Date: Sun, 08 Apr 2007 21:25:10 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

On April 08 at 21:04 EDT, Anthony Liguori hastily scribbled:
> Thomas Tuttle wrote:
> >+    if (x_position > vs->ds->width)  x_position = vs->ds->width;
> >+    if (y_position > vs->ds->height) y_position = vs->ds->height;
> >+    if (x_position + w >= vs->ds->width)  w = vs->ds->width  - x_position;
> >+    if (y_position + h >= vs->ds->height) h = vs->ds->height - y_position;
> >+    if (w < 0) w = 0;
> >+    if (h < 0) h = 0;
> 
> These last two lines aren't strictly needed since x_position cannot be > 
> than vs->ds->width due to the first check but otherwise the patch looks 
> good.

You're right.  I've attached a new version of the patch.

--Thomas Tuttle

Attachment: qemu-crop-vnc-update.patch
Description: Text document

Attachment: pgpRB3N14AWDU.pgp
Description: PGP signature


reply via email to

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