fixed copying wrong size to buffer

This commit is contained in:
2023-10-31 08:39:57 +01:00
parent 4ca72ffb01
commit 1f9adf7cec

View File

@@ -269,7 +269,7 @@ static long device_ioctl(struct file *file, unsigned int ioctl_num, unsigned lon
switch (ioctl_num) {
case IOCTL_GETMODULE:
if (copy_from_user((void *)mod, (int *)arg, sizeof(char *)))
if (copy_from_user((void *)mod, (int *)arg, sizeof(char) * 256))
return -EFAULT;
return_value = list_process_modules(mod);
addr = return_value;