summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-10-16 11:42:44 (GMT)
committerGitHub <noreply@github.com>2023-10-16 11:42:44 (GMT)
commitc2192a2bee17e2ce80c5af34410ccd0c8b6e08aa (patch)
treee7415e1d5892ed5401ccc73dc4924d24a2aac4d3 /Python
parentdb656aebc659e5023d004053db44031176bbe9f5 (diff)
downloadcpython-c2192a2bee17e2ce80c5af34410ccd0c8b6e08aa.zip
cpython-c2192a2bee17e2ce80c5af34410ccd0c8b6e08aa.tar.gz
cpython-c2192a2bee17e2ce80c5af34410ccd0c8b6e08aa.tar.bz2
gh-110864: Fix _PyArg_UnpackKeywordsWithVararg overwriting vararg with NULL (#110868)
Diffstat (limited to 'Python')
-rw-r--r--Python/getargs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index a0eef2c..e216986 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -2522,7 +2522,7 @@ _PyArg_UnpackKeywordsWithVararg(PyObject *const *args, Py_ssize_t nargs,
*
* Otherwise, we leave a place at `buf[vararg]` for vararg tuple
* so the index is `i + 1`. */
- if (nargs < vararg) {
+ if (nargs < vararg && i != vararg) {
buf[i] = current_arg;
}
else {