mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +00:00
Kernel: Fix SMAP violation in sys$getrandom()
This commit is contained in:
@@ -3926,6 +3926,7 @@ int Process::sys$getrandom(void* buffer, size_t buffer_size, unsigned int flags
|
||||
if (!validate_write(buffer, buffer_size))
|
||||
return -EFAULT;
|
||||
|
||||
SmapDisabler disabler;
|
||||
get_good_random_bytes((u8*)buffer, buffer_size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user