summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-02-13 22:36:36 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-02-13 22:48:09 +0000
commit2d9fcb3f729e3959dd30b7d7859438894b806b34 (patch)
tree1b09e016138f01b890263b4770299c4b05a6a200
parent1037a1a3f6a8dbde017a28a7b59ef5398c84dba1 (diff)
sna: Filter out requests to create a 0x0 frontbuffer
Attempting to create a 0x0 frontbuffer results in erroneous pixmap generation, and is liable to explode at a random point in future, so just reject it outright. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_display.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 54e45ffd..70673b0a 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -3273,6 +3273,10 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height)
if (scrn->virtualX == width && scrn->virtualY == height)
return TRUE;
+ /* Paranoid defense against rogue internal calls by Xorg */
+ if (width == 0 || height == 0)
+ return FALSE;
+
assert(sna->front);
assert(screen->GetScreenPixmap(screen) == sna->front);