Commit c63079c6 authored by Mario Limonciello's avatar Mario Limonciello Committed by Alex Deucher
Browse files

drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430



For pptable structs that use flexible array sizes, use flexible arrays.

Suggested-by: default avatarFelix Held <felix.held@amd.com>
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2894


Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 760efbca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ typedef struct _ATOM_PPLIB_THERMALCONTROLLER
typedef struct _ATOM_PPLIB_STATE
{
    UCHAR ucNonClockStateIndex;
    UCHAR ucClockStateIndices[1]; // variable-sized
    UCHAR ucClockStateIndices[]; // variable-sized
} ATOM_PPLIB_STATE;