Prevent SEGV in VNC server for old clients (Anthony Liguori).
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 20 May 2008 00:07:58 +0000 (00:07 +0000)
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 20 May 2008 00:07:58 +0000 (00:07 +0000)
commit05fa7561c51c498fdc4c0348e4070559b62765c1
treee2bd31624a490688671d9c71b53d7fe2b11c65e8
parentbc79ed46a253537a95971d1a0bea919974b663da
Prevent SEGV in VNC server for old clients (Anthony Liguori).

If the client does not support the DesktopResize pseudo-encoding, then
vs->{width,height} may be smaller than ds->{width,height}.  dirty_row is
sized according to vs->{width,height}, not ds->{width,height}.

This patch makes sure to bound the update region to vs->{width,height} to
avoid a possible SEGV.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Reported-by: Marcelo Tosatti <mtosatti@redhat.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4502 c046a42c-6fe2-441c-8c8c-71466251a162
vnc.c