Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9290419

Browse filesBrowse 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
Copy full SHA for 9290419

File tree

2 files changed

+4
-2
lines changed
Filter options

2 files changed

+4
-2
lines changed
+2Lines 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

Copy file name to clipboardExpand all lines: Modules/_winapi.c
+2-2Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.