Skip to content

Commit fce11ab

Browse files
committed
Mark bytes returned by getrandom as initialized for MSan
1 parent 44d4145 commit fce11ab

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎Modules/posixmodule.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16824,6 +16824,8 @@ os_getrandom_impl(PyObject *module, Py_ssize_t size, int flags)
1682416824
goto error;
1682516825
}
1682616826

16827+
_Py_MSAN_UNPOISON(PyBytes_AS_STRING(bytes), n);
16828+
1682716829
if (n != size) {
1682816830
_PyBytes_Resize(&bytes, n);
1682916831
}

0 commit comments

Comments
 (0)