drm/amd/display: Fix a potential buffer overflow in 'dp_dsc_clock_en_read()'
authorjsg <jsg@openbsd.org>
Wed, 27 Mar 2024 04:37:32 +0000 (04:37 +0000)
committerjsg <jsg@openbsd.org>
Wed, 27 Mar 2024 04:37:32 +0000 (04:37 +0000)
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

index 2cf9d02..045b116 100644 (file)
@@ -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);