mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
Kernel: Use copy_typed_from_user() in more places :^)
This commit is contained in:
parent
39d9337db5
commit
abf2204402
Notes:
sideshowbarker
2024-07-17 22:40:12 +09:00
Author: https://github.com/awesomekling
Commit: abf2204402
9 changed files with 41 additions and 66 deletions
|
@ -318,8 +318,7 @@ ErrorOr<void> Inode::can_apply_flock(OpenFileDescription const& description, flo
|
|||
|
||||
ErrorOr<void> Inode::apply_flock(Process const& process, OpenFileDescription const& description, Userspace<flock const*> input_lock)
|
||||
{
|
||||
flock new_lock = {};
|
||||
TRY(copy_from_user(&new_lock, input_lock));
|
||||
auto new_lock = TRY(copy_typed_from_user(input_lock));
|
||||
TRY(normalize_flock(description, new_lock));
|
||||
|
||||
MutexLocker locker(m_inode_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue