summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xext/shm.c10
-rw-r--r--glx/glxdri2.c3
-rw-r--r--hw/xfree86/modes/xf86Crtc.h2
-rw-r--r--include/servermd.h2
4 files changed, 15 insertions, 2 deletions
diff --git a/Xext/shm.c b/Xext/shm.c
index db9d47450..b359a9035 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -260,7 +260,7 @@ ShmDestroyPixmap(PixmapPtr pPixmap)
pScreen->DestroyPixmap = ShmDestroyPixmap;
if (shmdesc)
- ShmDetachSegment(shmdesc, pPixmap->drawable.id);
+ ShmDetachSegment(shmdesc, 0);
return ret;
}
@@ -427,7 +427,7 @@ ProcShmAttach(ClientPtr client)
/*ARGSUSED*/ static int
ShmDetachSegment(void *value, /* must conform to DeleteType */
- XID shmseg)
+ XID unused)
{
ShmDescPtr shmdesc = (ShmDescPtr) value;
ShmDescPtr *prev;
@@ -971,6 +971,12 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
stuff->offset);
if (pMap) {
+ result = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid,
+ RT_PIXMAP, pMap, RT_NONE, NULL, DixCreateAccess);
+ if (result != Success) {
+ pDraw->pScreen->DestroyPixmap(pMap);
+ return result;
+ }
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
shmdesc->refcnt++;
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index bcd57a4a3..c0f29ea31 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -936,6 +936,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
size_t buffer_size;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ if (!enableIndirectGLX)
+ return NULL;
+
screen = calloc(1, sizeof *screen);
if (screen == NULL)
return NULL;
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 3c5bbcfd5..8b0160845 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -745,6 +745,8 @@ xf86CompatOutput(ScrnInfoPtr pScrn)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ if (config->compat_output < 0)
+ return NULL;
return config->output[config->compat_output];
}
diff --git a/include/servermd.h b/include/servermd.h
index a3b5c3af3..087826f48 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -52,6 +52,8 @@ SOFTWARE.
#error xserver code must include dix-config.h before any other headers
#endif
+#include <X11/Xarch.h> /* for X_LITTLE_ENDIAN/X_BIG_ENDIAN */
+
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
#define IMAGE_BYTE_ORDER LSBFirst
#define BITMAP_BIT_ORDER LSBFirst