From: jsg Date: Wed, 27 Mar 2024 04:37:32 +0000 (+0000) Subject: drm/amd/display: Fix a potential buffer overflow in 'dp_dsc_clock_en_read()' X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=23b210c5d04ef0eea7c6ed2ec4874ecccfffff7a;p=openbsd 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 --- 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);