From: Clinton Date: Mon, 10 Jun 2024 08:17:50 +0000 (-0400) Subject: gh-120296: Fix format string of fcntl.ioctl() audit (#120301) X-Git-Tag: v3.14.0a1~1550 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5a7bc6f2eb9a3875063423caa67bb0ffcc3a6b8;p=thirdparty%2FPython%2Fcpython.git gh-120296: Fix format string of fcntl.ioctl() audit (#120301) --- diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c index 873bdf2ac065..0c06c03a6c40 100644 --- a/Modules/fcntlmodule.c +++ b/Modules/fcntlmodule.c @@ -170,7 +170,7 @@ fcntl_ioctl_impl(PyObject *module, int fd, unsigned long code, Py_ssize_t len; char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */ - if (PySys_Audit("fcntl.ioctl", "iIO", fd, code, + if (PySys_Audit("fcntl.ioctl", "ikO", fd, code, ob_arg ? ob_arg : Py_None) < 0) { return NULL; }