From 1f9adf7cecd2e938de8e4f6aeb6570eef9e7f336 Mon Sep 17 00:00:00 2001 From: ALittlePatate Date: Tue, 31 Oct 2023 08:39:57 +0100 Subject: [PATCH] fixed copying wrong size to buffer --- km/TaxiDriver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/km/TaxiDriver.c b/km/TaxiDriver.c index d927f32..38fd3e5 100644 --- a/km/TaxiDriver.c +++ b/km/TaxiDriver.c @@ -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;