From: Murray McAllister Date: Mon, 27 Mar 2017 09:12:53 +0000 (+0200) Subject: drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl() X-Git-Tag: v3.2.89~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20996e6d81c907b10a5ab57c4172be97cb1a7de1;p=pandora-kernel.git drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl() commit 36274ab8c596f1240c606bb514da329add2a1bcd upstream. Before memory allocations vmw_surface_define_ioctl() checks the upper-bounds of a user-supplied size, but does not check if the supplied size is 0. Add check to avoid NULL pointer dereferences. Signed-off-by: Murray McAllister Reviewed-by: Sinclair Yeh [bwh: Backported to 3.2: adjust filename] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed