From 23b210c5d04ef0eea7c6ed2ec4874ecccfffff7a Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 27 Mar 2024 04:37:32 +0000 Subject: [PATCH] drm/amd/display: Fix a potential buffer overflow in 'dp_dsc_clock_en_read()' From Srinivasan Shanmugam ad76fd30557d6a106c481e4606a981221ca525f7 in linux-6.6.y/6.6.23 4b09715f1504f1b6e8dff0e9643630610bc05141 in mainline linux --- sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c index 2cf9d02429a..045b116156c 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c @@ -1453,7 +1453,7 @@ static ssize_t dp_dsc_clock_en_read(struct file *f, char __user *buf, const uint32_t rd_buf_size = 10; struct pipe_ctx *pipe_ctx; ssize_t result = 0; - int i, r, str_len = 30; + int i, r, str_len = 10; rd_buf = kcalloc(rd_buf_size, sizeof(char), GFP_KERNEL); -- 2.20.1