]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/nv50/disp: min/max are reversed in nv50_crtc_gamma_set()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 27 Nov 2013 22:18:47 +0000 (01:18 +0300)
committerJiri Slaby <jslaby@suse.cz>
Fri, 3 Mar 2017 10:31:15 +0000 (11:31 +0100)
commit4b1774f7e3ed756de003487b172553ae38b69aa8
tree837d87182b6b2ae44a2b2070fcb45bfcc778c492
parentc8a1464f668b64bb9d043ad33903f5c2d969e431
drm/nv50/disp: min/max are reversed in nv50_crtc_gamma_set()

commit bdefc8cbdfc71ea73e0573dbd2d24c0a68232218 upstream.

We should be taking the minimum here instead of the max.  It could lead
to a buffer overflow.

Fixes: 438d99e3b175 ('drm/nvd0/disp: initial crtc object implementation')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
a/drm/nv50_display.c b/drm/nv50_display.c
index f8e66c08b11a..4e384a2f99c3 100644
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/gpu/drm/nouveau/nv50_display.c