From 697beec04dbbd03508e02df9f0042ce5a8772b46 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 4 Sep 2024 17:02:48 +0100 Subject: [PATCH] [3.11] gh-119690: Fixes buffer type confusion in _winapi.CreateNamedPipe audit event (#119734) gh-119690: Fixes buffer type confusion in _winapi.CreateNamedPipe audit event --- .../next/Windows/2024-05-29-17-00-27.gh-issue-119690.tv6Zgs.rst | 2 ++ Modules/_winapi.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Windows/2024-05-29-17-00-27.gh-issue-119690.tv6Zgs.rst diff --git a/Misc/NEWS.d/next/Windows/2024-05-29-17-00-27.gh-issue-119690.tv6Zgs.rst b/Misc/NEWS.d/next/Windows/2024-05-29-17-00-27.gh-issue-119690.tv6Zgs.rst new file mode 100644 index 00000000000..45e644c652b --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2024-05-29-17-00-27.gh-issue-119690.tv6Zgs.rst @@ -0,0 +1,2 @@ +Fixes data type confusion in audit event raised by +``_winapi.CreateNamedPipe``. diff --git a/Modules/_winapi.c b/Modules/_winapi.c index 54eee9e8c3f..0376cc0a26f 100644 --- a/Modules/_winapi.c +++ b/Modules/_winapi.c @@ -708,7 +708,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; }