[PATCH] Fix bug #7035: unnecessary memmove in XOpenDisplay.

Jamey Sharp jamey at minilop.net
Thu Jun 8 20:19:45 PDT 2006


Using memmove on the connection setup data causes a problem for XCB, but making
Xlib stop doing that should be harmless for non-XCB as well.

---

I'd like review before I commit this patch. Does the memmove somehow
make XOpenDisplay 64-bit clean or something? (Doesn't seem likely to
me...)

 src/OpenDis.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

b18713ec3f36a10b3cdb1e16f9550e1d2e05dff0
diff --git a/src/OpenDis.c b/src/OpenDis.c
index 199e978..f4949ee 100644
--- a/src/OpenDis.c
+++ b/src/OpenDis.c
@@ -477,11 +477,8 @@ #endif /* USE_XCB */
   	(void) strncpy(dpy->vendor, u.vendor, vendorlen);
 	dpy->vendor[vendorlen] = '\0';
  	vendorlen = (vendorlen + 3) & ~3;	/* round up */
+	u.vendor += vendorlen;
 
-
-	memmove (setup, u.vendor + vendorlen,
-		 (int) setuplength - sz_xConnSetup - vendorlen);
- 	u.vendor = setup;
 /*
  * Now iterate down setup information.....
  */
-- 
1.3.3



More information about the xorg mailing list