aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_bitmap.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2018-05-16 14:00:26 +0000
committerDaniel Vetter <[email protected]>2018-05-16 15:56:06 +0000
commit2b6207291b7b277a5df9d1aab44b56815a292dba (patch)
treee82d043e6e1cdd9a0a94b95023e8cd786d8217de /lib/test_bitmap.c
parentdrm/vc4: Fix leak of the file_priv that stored the perfmon. (diff)
downloadkernel-2b6207291b7b277a5df9d1aab44b56815a292dba.tar.gz
kernel-2b6207291b7b277a5df9d1aab44b56815a292dba.zip
drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()
There is a comment here which says that DIV_ROUND_UP() and that's where the problem comes from. Say you pick: args->bpp = UINT_MAX - 7; args->width = 4; args->height = 1; The integer overflow in DIV_ROUND_UP() means "cpp" is UINT_MAX / 8 and because of how we picked args->width that means cpp < UINT_MAX / 4. I've fixed it by preventing the integer overflow in DIV_ROUND_UP(). I removed the check for !cpp because it's not possible after this change. I also changed all the 0xffffffffU references to U32_MAX. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20180516140026.GA19340@mwanda
Diffstat (limited to 'lib/test_bitmap.c')
0 files changed, 0 insertions, 0 deletions