diff options
author | Thorsten Blum <[email protected]> | 2024-07-05 08:58:55 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-07-05 10:01:42 +0200 |
commit | f0f53369af368b7ffc8a12bff508d7c958cce8b2 (patch) | |
tree | 1fe06f860bbeec27c0ed77b786aee0e7dc1697e4 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 9d7eb234ac7a56b88aea8a52ed81553a730fe25c (diff) |
misc: fastrpc: Use memdup_user()
Switching to memdup_user() overwrites the allocated memory only once,
whereas kzalloc() followed by copy_from_user() initializes the allocated
memory to zero and then immediately overwrites it.
Fixes the following Coccinelle/coccicheck warning reported by
memdup_user.cocci:
WARNING opportunity for memdup_user
Signed-off-by: Thorsten Blum <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions