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 2309739

Browse filesBrowse files
[3.8] gh-119690: Fixes buffer type confusion in _winapi.CreateFile and _winapi.CreateNamedPipe audit events (GH-119735) (#123680)
(cherry picked from commit 2e861ac) Co-authored-by: Steve Dower <steve.dower@python.org>
1 parent 0a87812 commit 2309739
Copy full SHA for 2309739

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;
@@ -682,7 +682,7 @@ _winapi_CreateNamedPipe_impl(PyObject *module, LPCTSTR name, DWORD open_mode,
682682
{
683683
HANDLE handle;
684684

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.