summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Python/bootstrap_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tools/python3/src/Python/bootstrap_hash.c')
-rw-r--r--contrib/tools/python3/src/Python/bootstrap_hash.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/tools/python3/src/Python/bootstrap_hash.c b/contrib/tools/python3/src/Python/bootstrap_hash.c
index e189ce0d901..77ccbee18d4 100644
--- a/contrib/tools/python3/src/Python/bootstrap_hash.c
+++ b/contrib/tools/python3/src/Python/bootstrap_hash.c
@@ -144,6 +144,11 @@ py_getrandom(void *buffer, Py_ssize_t size, int blocking, int raise)
else {
n = getrandom(dest, n, flags);
}
+# ifdef _Py_MEMORY_SANITIZER
+ if (n > 0) {
+ __msan_unpoison(dest, n);
+ }
+# endif
#else
/* On Linux, use the syscall() function because the GNU libc doesn't
expose the Linux getrandom() syscall yet. See: