rpms/vnc/devel vnc-bounds.patch, NONE, 1.1 vnc.spec, 1.188, 1.189 vnc-getimage.patch, 1.1, NONE

Adam Tkac (atkac) fedora-extras-commits at redhat.com
Wed Mar 19 11:48:21 UTC 2008


Author: atkac

Update of /cvs/pkgs/rpms/vnc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4365

Modified Files:
	vnc.spec 
Added Files:
	vnc-bounds.patch 
Removed Files:
	vnc-getimage.patch 
Log Message:
- validate framebuffer bounds before GetImage call (#430468, improved fix)


vnc-bounds.patch:

--- NEW FILE vnc-bounds.patch ---
diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.bounds vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc
--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.bounds	2008-03-17 16:46:27.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc	2008-03-17 16:59:11.000000000 +0100
@@ -486,32 +486,36 @@ void XserverDesktop::add_changed(RegionP
 {
   if (ignoreHooks_) return;
   if (grabbing) return;
+
+  BoxRec screenbox;
+  RegionPtr newreg = REGION_CREATE(pScreen, 0, 0);
+
+  screenbox.x1 = screenbox.y1 = 0;
+  screenbox.x2 = pScreen->width;
+  screenbox.y2 = pScreen->height;
+
+  RegionPtr screenreg = REGION_CREATE(pScreen, &screenbox, 0);
+  REGION_INTERSECT(pScreen, newreg, reg, screenreg);
+  REGION_DESTROY (pScreen, screenreg);
+
   try {
     rfb::Region rfbReg;
-    rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, reg),
-                                     REGION_NUM_RECTS(reg),
-                                     (ShortRect*)REGION_RECTS(reg));
+    rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, newreg),
+                                     REGION_NUM_RECTS(newreg),
+                                     (ShortRect*)REGION_RECTS(newreg));
     server->add_changed(rfbReg);
     deferUpdate();
   } catch (rdr::Exception& e) {
     vlog.error("XserverDesktop::add_changed: %s",e.str());
   }
+  REGION_DESTROY (pScreen, newreg);
 }
 
 void XserverDesktop::add_copied(RegionPtr dst, int dx, int dy)
 {
-  if (ignoreHooks_) return;
-  if (grabbing) return;
-  try {
-    rfb::Region rfbReg;
-    rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, dst),
-                                     REGION_NUM_RECTS(dst),
-                                     (ShortRect*)REGION_RECTS(dst));
-    server->add_copied(rfbReg, rfb::Point(dx, dy));
-    deferUpdate();
-  } catch (rdr::Exception& e) {
-    vlog.error("XserverDesktop::add_copied: %s",e.str());
-  }
+  add_changed (dst);
+  REGION_TRANSLATE (pScreen, dst, -dx, -dy);
+  add_changed (dst);
 }
 
 void XserverDesktop::positionCursor()


Index: vnc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/vnc/devel/vnc.spec,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -r1.188 -r1.189
--- vnc.spec	14 Mar 2008 12:19:30 -0000	1.188
+++ vnc.spec	19 Mar 2008 11:47:44 -0000	1.189
@@ -3,7 +3,7 @@
 Summary:   A remote display system
 Name:      vnc
 Version:   4.1.2
-Release:   27.1%{?dist}
+Release:   28%{?dist}
 URL:       http://www.realvnc.com
 Source0:   http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz
 Source1:   Makefile.am
@@ -42,10 +42,10 @@
 Patch44:   vnc-noxkb.patch
 Patch45:   vnc-paint.patch
 Patch46:   vnc-selections.patch
-Patch47:   vnc-getimage.patch
 Patch48:   vnc-manminor.patch
 Patch49:   vnc-clipboard.patch
 Patch50:   vnc-scrollbars.patch
+Patch51:   vnc-bounds.patch
 License:   GPLv2
 Group:     User Interface/Desktops
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
@@ -138,10 +138,10 @@
 %patch44 -p1 -b .noxkb
 %patch45 -p1 -b .paint
 %patch46 -p1 -b .selections
-%patch47 -p1 -b .getimage
-%patch48 -p1 -b .misc
+%patch48 -p1 -b .minor
 %patch49 -p1 -b .clipboard
 %patch50 -p1 -b .scrollbars
+%patch51 -p1 -b .bounds
 
 %build
 export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0"
@@ -332,6 +332,9 @@
 %{_libdir}/librfb.so.*
 
 %changelog
+* Wed Mar 19 2008 Adam Tkac <atkac redhat com> 4.1.2-28
+- validate framebuffer bounds before GetImage call (#430468, improved fix)
+
 * Fri Mar 14 2008 Adam Tkac <atkac redhat com> 4.1.2-27.1
 - fixed assertion failed when only one scrollbar should be used (#428117)
 


--- vnc-getimage.patch DELETED ---




More information about the fedora-extras-commits mailing list