[PATCH] drm/amdgpu: fix out of bounds memcpy
Nirmoy
nirmodas at amd.com
Wed Apr 8 11:12:44 UTC 2020
On 4/8/20 12:16 PM, Christian König wrote:
> The buffer needs to be two bytes larger when the maximum is 32.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
Acked-by: Nirmoy Das <nirmoy.das at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> index 9d17761721de..c7e55fe170bd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> @@ -85,7 +85,7 @@ int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
>
> int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
> {
> - unsigned char buff[32];
> + unsigned char buff[34];
> int addrptr = 0, size = 0;
>
> if (!is_fru_eeprom_supported(adev))
More information about the amd-gfx
mailing list