diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-13 10:36:35 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-13 10:40:21 +0100 |
commit | f9a18c9f38d09c145eb513ca989966dc135c1e9b (patch) | |
tree | 378e3f68366316abeedf6b10bd8c065a1db3491c /src/uxa | |
parent | 978b93a20bb2ba647138d0d8954fac60b215f7c6 (diff) |
uxa: Check for allocation failure in i915 video
For a large screen, we have to create a temporary surface for rendering
the textured video. If this pixmap creation fails we may be left with a
system memory only pixmap leading to a segfault.
Reported-by: Bas Wijnen <wijnen@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/uxa')
-rw-r--r-- | src/uxa/i915_video.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/uxa/i915_video.c b/src/uxa/i915_video.c index f6a1c6e1..16389cdb 100644 --- a/src/uxa/i915_video.c +++ b/src/uxa/i915_video.c @@ -78,6 +78,11 @@ I915DisplayVideoTextured(ScrnInfoPtr scrn, if (target == NULL) return; + if (intel_get_pixmap_bo(target) == NULL) { + screen->DestroyPixmap(target); + return; + } + pix_xoff = -dxo; pix_yoff = -dyo; } else { |