mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Kernel: Use copy_typed_from_user() in more places :^)
This commit is contained in:
parent
39d9337db5
commit
abf2204402
9 changed files with 41 additions and 66 deletions
|
@ -180,9 +180,7 @@ ErrorOr<FlatPtr> Process::peek_user_data(Userspace<const FlatPtr*> address)
|
|||
// This function can be called from the context of another
|
||||
// process that called PT_PEEK
|
||||
ScopedAddressSpaceSwitcher switcher(*this);
|
||||
FlatPtr data;
|
||||
TRY(copy_from_user(&data, address));
|
||||
return data;
|
||||
return TRY(copy_typed_from_user(address));
|
||||
}
|
||||
|
||||
ErrorOr<void> Process::peek_user_data(Span<u8> destination, Userspace<const u8*> address)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue