diff options
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common_syscalls.inc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_common_syscalls.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc index 00bb2aeef111a..31ff48cfd2cfc 100644 --- a/lib/sanitizer_common/sanitizer_common_syscalls.inc +++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc @@ -2873,6 +2873,18 @@ POST_SYSCALL(rt_sigaction)(long res, long signum, POST_WRITE(oldact, oldact_sz); } } + +PRE_SYSCALL(getrandom)(void *buf, uptr count, long flags) { + if (buf) { + PRE_WRITE(buf, count); + } +} + +POST_SYSCALL(getrandom)(long res, void *buf, uptr count, long flags) { + if (res > 0 && buf) { + POST_WRITE(buf, res); + } +} } // extern "C" #undef PRE_SYSCALL |