mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
gh-110864: Fix _PyArg_UnpackKeywordsWithVararg overwriting vararg with NULL (#110868)
This commit is contained in:
parent
db656aebc6
commit
c2192a2bee
5 changed files with 130 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue