OSDN Git Service

amdgpu: Do not write beyond allocated memory when parsing ids
authorJan Vesely <jan.vesely@rutgers.edu>
Fri, 1 Sep 2017 18:49:19 +0000 (14:49 -0400)
committerJan Vesely <jan.vesely@rutgers.edu>
Tue, 5 Sep 2017 03:48:54 +0000 (23:48 -0400)
commitd55d0804f9e37637d7510f38f97e07a50c6b7baa
tree7526b9ed8eb74abc7e17794233497d83ff317816
parent05a830d382382905d87b55af90aa109fb76e4c16
amdgpu: Do not write beyond allocated memory when parsing ids

Fixes crash when/usr/share/libdrm/amdgpu.ids contains ASIC_ID_TABLE_NUM_ENTRIES + 1 entries.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102432
Fixes: 7e6bf88cac315a9fa41818cf72a7b5d18a2cb1fc (amdgpu: move asic id table to a separate file)
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
amdgpu/amdgpu_asic_id.c