]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: avoid a possible array overflow
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Aug 2016 16:31:36 +0000 (12:31 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Sep 2016 06:34:50 +0000 (08:34 +0200)
commit0b24e675dc73ad099447b8e32a3a0eb444abf596
tree6a3bd51f4faa4d395957e9c0ea3a801a70c4bc2f
parent7715b24f7da6bbdd2f7bc27fcfb79299525d7927
drm/amdgpu: avoid a possible array overflow

commit e1718d97aa88ea44a6a8f50ff464253dd0dacf01 upstream.

When looking up the connector type make sure the index
is valid.  Avoids a later crash if we read past the end
of the array.

Workaround for bug:
https://bugs.freedesktop.org/show_bug.cgi?id=97460

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c