projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2abec30
)
Crop VNC update requests to avoid segfaults, by Thomas Tuttle.
author
ths
<ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 29 Apr 2007 01:53:20 +0000
(
01:53
+0000)
committer
ths
<ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 29 Apr 2007 01:53:20 +0000
(
01:53
+0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2741
c046a42c
-6fe2-441c-8c8c-
71466251a162
vnc.c
patch
|
blob
|
history
diff --git
a/vnc.c
b/vnc.c
index aba60d4c24523470640d07421ffc2d2cebe22037..70d30d9d83cb85d858d3871690f8e7ce430d4290 100644
(file)
--- a/
vnc.c
+++ b/
vnc.c
@@
-852,6
+852,15
@@
static void framebuffer_update_request(VncState *vs, int incremental,
int x_position, int y_position,
int w, int h)
{
+ 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;
+
int i;
vs->need_update = 1;
if (!incremental) {