8000 [3.9] gh-119690: Fixes buffer type confusion in _winapi.CreateFile an… · python/cpython@9290419 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9290419

Browse files
[3.9] gh-119690: Fixes buffer type confusion in _winapi.CreateFile and _winapi.CreateNamedPipe audit events (GH-119735) (#123679)
(cherry picked from commit 2e861ac) Co-authored-by: Steve Dower <steve.dower@python.org>
1 parent d662e2d commit 9290419

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixes data type confusion in audit events raised by ``_winapi.CreateFile``
2+
and ``_winapi.CreateNamedPipe``.

Modules/_winapi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ _winapi_CreateFile_impl(PyObject *module, LPCTSTR file_name,
461461
{
462462
HANDLE handle;
463463

464-
if (PySys_Audit("_winapi.CreateFile", "uIIII",
464+
if (PySys_Audit("_winapi.CreateFile", "sIIII",
465465
file_name, desired_access, share_mode,
466466
creation_disposition, flags_and_attributes) < 0) {
467467
return INVALID_HANDLE_VALUE;
@@ -681,7 +681,7 @@ _winapi_CreateNamedPipe_impl(PyObject *module, LPCTSTR name, DWORD open_mode,
681681
{
682682
HANDLE handle;
683683

684-
if (PySys_Audit("_winapi.CreateNamedPipe", "uII",
684+
if (PySys_Audit("_winapi.CreateNamedPipe", "sII",
685685
name, open_mode, pipe_mode) < 0) {
686686
return INVALID_HANDLE_VALUE;
687687
}

0 commit comments

Comments
 (0)
0