mirror of
https://github.com/X11Libre/xf86-video-intel.git
synced 2026-03-24 01:24:12 +00:00
Check return value of uxa_acquire_solid() since it can return NULL
uxa_acquire_solid returns NULL under OOM. Thus the value of solid must be checked before dereferencing it in the uxa_get_offscreen() call. Signed-off-by: Bryce Harrington <bryce@canonical.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
committed by
Chris Wilson
parent
da990536ec
commit
6e721e098b
@@ -120,6 +120,10 @@ uxa_fill_spans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||
|
||||
solid = uxa_acquire_solid(screen, src->pSourcePict);
|
||||
FreePicture(src, 0);
|
||||
if (!solid) {
|
||||
FreePicture(dst, 0);
|
||||
goto solid;
|
||||
}
|
||||
|
||||
src = solid;
|
||||
src_pixmap = uxa_get_offscreen_pixmap(src->pDrawable,
|
||||
@@ -1110,6 +1114,10 @@ try_solid:
|
||||
|
||||
solid = uxa_acquire_solid(screen, src->pSourcePict);
|
||||
FreePicture(src, 0);
|
||||
if (!solid) {
|
||||
FreePicture(dst, 0);
|
||||
goto err;
|
||||
}
|
||||
|
||||
src = solid;
|
||||
src_pixmap = uxa_get_offscreen_pixmap(src->pDrawable,
|
||||
|
||||
@@ -1061,6 +1061,8 @@ try_solid:
|
||||
int src_off_x, src_off_y;
|
||||
|
||||
solid = uxa_acquire_solid(screen, src->pSourcePict);
|
||||
if (!solid)
|
||||
goto err_src;
|
||||
FreePicture(src, 0);
|
||||
|
||||
src = solid;
|
||||
|
||||
Reference in New Issue
Block a user