sharkcz / rpms / tigervnc

Forked from rpms/tigervnc 4 years ago
Clone
Blob Blame History Raw
diff -Nur tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e.orig/unix/xserver/hw/vnc/xorg-version.h tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e/unix/xserver/hw/vnc/xorg-version.h
--- tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e.orig/unix/xserver/hw/vnc/xorg-version.h	2015-03-01 12:58:35.000000000 -0700
+++ tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e/unix/xserver/hw/vnc/xorg-version.h	2015-08-04 09:46:14.796336147 -0600
@@ -48,8 +48,12 @@
 #define XORG 115
 #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (16 * 100000) + (99 * 1000))
 #define XORG 116
+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (17 * 100000) + (99 * 1000))
+#define XORG 117
+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (18 * 100000) + (99 * 1000))
+#define XORG 118
 #else
-#error "X.Org newer than 1.16 is not supported"
+#error "X.Org newer than 1.18 is not supported"
 #endif
 
 #endif
diff -Nur tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e.orig/unix/xserver/hw/vnc/xvnc.cc tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e/unix/xserver/hw/vnc/xvnc.cc
--- tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e.orig/unix/xserver/hw/vnc/xvnc.cc	2015-03-01 12:58:35.000000000 -0700
+++ tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e/unix/xserver/hw/vnc/xvnc.cc	2015-08-04 09:48:07.632507101 -0600
@@ -717,9 +717,9 @@
 	entries = pmap->pVisual->ColormapEntries;
 	pVisual = pmap->pVisual;
 
-	ppix = (Pixel *)xalloc(entries * sizeof(Pixel));
-	prgb = (xrgb *)xalloc(entries * sizeof(xrgb));
-	defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
+	ppix = (Pixel *)calloc(entries, sizeof(Pixel));
+	prgb = (xrgb *)calloc(entries, sizeof(xrgb));
+	defs = (xColorItem *)calloc(entries, sizeof(xColorItem));
 
 	for (i = 0; i < entries; i++)  ppix[i] = i;
 	/* XXX truecolor */
@@ -738,9 +738,9 @@
 	}
 	(*pmap->pScreen->StoreColors)(pmap, entries, defs);
 	
-	xfree(ppix);
-	xfree(prgb);
-	xfree(defs);
+	free(ppix);
+	free(prgb);
+	free(defs);
     }
 }