From 688cf730e1f45588a573410d27a699d18e2feef6 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 29 May 2024 17:00:43 +0100 Subject: [PATCH] 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 00000000000000..45e644c652b67b --- /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 54eee9e8c3f1d5..0376cc0a26f832 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; }