Skip to content

Commit 2309739

Browse 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

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;
@@ -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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy