fixed copying wrong size to buffer
This commit is contained in:
@@ -269,7 +269,7 @@ static long device_ioctl(struct file *file, unsigned int ioctl_num, unsigned lon
|
|||||||
|
|
||||||
switch (ioctl_num) {
|
switch (ioctl_num) {
|
||||||
case IOCTL_GETMODULE:
|
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 -EFAULT;
|
||||||
return_value = list_process_modules(mod);
|
return_value = list_process_modules(mod);
|
||||||
addr = return_value;
|
addr = return_value;
|
||||||
|
|||||||
Reference in New Issue
Block a user