Skip to content

Commit

Permalink
drivers/flash: Fix z_vrfy_flash_handler
Browse files Browse the repository at this point in the history
Wrong write size has been given.

Fixes #81910
Coverity CID: 434734

Signed-off-by: Dominik Ermel <[email protected]>
  • Loading branch information
de-nordic authored and kartben committed Dec 12, 2024
1 parent 9911bd0 commit 63d5ba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/flash/flash_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static inline int z_vrfy_flash_erase(const struct device *dev, off_t offset,
static inline int z_vrfy_flash_get_size(const struct device *dev, uint64_t *size)
{
K_OOPS(K_SYSCALL_OBJ(dev, K_OBJ_DRIVER_FLASH));
K_OOPS(K_SYSCALL_MEMORY_WRITE(size, sizeof(size)));
K_OOPS(K_SYSCALL_MEMORY_WRITE(size, sizeof(*size)));
return z_impl_flash_get_size((const struct device *)dev, size);
}
#include <zephyr/syscalls/flash_get_size_mrsh.c>
Expand Down

0 comments on commit 63d5ba4

Please sign in to comment.