Skip to content

Commit 4a0bdb6

Browse files
committed
gh-148850: Fix msan false positive in os.getrandom
1 parent 42d645a commit 4a0bdb6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Modules/posixmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17195,6 +17195,10 @@ os_getrandom_impl(PyObject *module, Py_ssize_t size, int flags)
1719517195
goto error;
1719617196
}
1719717197

17198+
#ifdef _Py_MEMORY_SANITIZER
17199+
__msan_unpoison(data, size);
17200+
#endif
17201+
1719817202
return PyBytesWriter_FinishWithSize(writer, n);
1719917203

1720017204
error:

0 commit comments

Comments
 (0)