[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:
Steve Dower 2024-09-04 16:57:40 +01:00 committed by GitHub
parent b2f11ca766
commit 2e861ac1cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1,2 @@
Fixes data type confusion in audit events raised by ``_winapi.CreateFile``
and ``_winapi.CreateNamedPipe``.

View File

@ -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;
}