]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Fix a potential buffer overflow in 'dp_dsc_clock_en_read()'
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Tue, 23 Jan 2024 14:48:07 +0000 (20:18 +0530)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:44 +0000 (18:19 -0400)
commitad76fd30557d6a106c481e4606a981221ca525f7
tree9af045ac4144d568a30a090ea8f5b6d64c2f56c1
parent7e062c083dc9e248ddd096b9e893c974534e7014
drm/amd/display: Fix a potential buffer overflow in 'dp_dsc_clock_en_read()'

[ Upstream commit 4b09715f1504f1b6e8dff0e9643630610bc05141 ]

Tell snprintf() to store at most 10 bytes in the output buffer
instead of 30.

Fixes the below:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1508 dp_dsc_clock_en_read() error: snprintf() is printing too much 30 vs 10

Fixes: c06e09b76639 ("drm/amd/display: Add DSC parameters logging to debugfs")
Cc: Alex Hung <alex.hung@amd.com>
Cc: Qingqing Zhuo <qingqing.zhuo@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c