mirror of https://github.com/python/cpython.git
[3.10] gh-119690: Fixes buffer type confusion in _winapi.CreateFile and _winapi.CreateNamedPipe audit events (#119735)
gh-119690: Fixes buffer type confusion in _winapi.CreateFile and _winapi.CreateNamedPipe audit events
This commit is contained in:
parent
b2f11ca766
commit
2e861ac1cd
|
@ -0,0 +1,2 @@
|
|||
Fixes data type confusion in audit events raised by ``_winapi.CreateFile``
|
||||
and ``_winapi.CreateNamedPipe``.
|
|
@ -470,7 +470,7 @@ _winapi_CreateFile_impl(PyObject *module, LPCTSTR file_name,
|
|||
{
|
||||
HANDLE handle;
|
||||
|
||||
if (PySys_Audit("_winapi.CreateFile", "uIIII",
|
||||
if (PySys_Audit("_winapi.CreateFile", "sIIII",
|
||||
file_name, desired_access, share_mode,
|
||||
creation_disposition, flags_and_attributes) < 0) {
|
||||
return INVALID_HANDLE_VALUE;
|
||||
|
@ -690,7 +690,7 @@ _winapi_CreateNamedPipe_impl(PyObject *module, LPCTSTR name, DWORD open_mode,
|
|||
{
|
||||
HANDLE handle;
|
||||
|
||||
if (PySys_Audit("_winapi.CreateNamedPipe", "uII",
|
||||
if (PySys_Audit("_winapi.CreateNamedPipe", "sII",
|
||||
name, open_mode, pipe_mode) < 0) {
|
||||
return INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue