Skip to content

Commit fbbf23d

Browse files
Colin Ian Kingkraxel
authored andcommitted
drm: qxl: ensure surf.data is ininitialized
The object surf is not fully initialized and the uninitialized field surf.data is being copied by the call to qxl_bo_create via the call to qxl_gem_object_create. Set surf.data to zero to ensure garbage data from the stack is not being copied. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: f64122c ("drm: add new QXL driver. (v1.4)") Signed-off-by: Colin Ian King <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Gerd Hoffmann <[email protected]>
1 parent e99168f commit fbbf23d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/qxl/qxl_dumb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ int qxl_mode_dumb_create(struct drm_file *file_priv,
5858
surf.height = args->height;
5959
surf.stride = pitch;
6060
surf.format = format;
61+
surf.data = 0;
62+
6163
r = qxl_gem_object_create_with_handle(qdev, file_priv,
6264
QXL_GEM_DOMAIN_CPU,
6365
args->size, &surf, &qobj,

0 commit comments

Comments
 (0)