drivers: counter: Fix get_value verification handler
z_vrfy_counter_get_value should check the size of memory pointed to ticks and not the size of the pointer. Fixes: #22431 Coverity CID :207984 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
a7b327310d
commit
81d96d6e9b
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ static inline int z_vrfy_counter_get_value(struct device *dev,
|
|||
u32_t *ticks)
|
||||
{
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_COUNTER(dev, get_value));
|
||||
Z_OOPS(Z_SYSCALL_MEMORY_WRITE(ticks, sizeof(ticks)));
|
||||
Z_OOPS(Z_SYSCALL_MEMORY_WRITE(ticks, sizeof(*ticks)));
|
||||
return z_impl_counter_get_value((struct device *)dev, ticks);
|
||||
}
|
||||
#include <syscalls/counter_get_value_mrsh.c>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue