diff options
author | Ken Jin <kenjin@python.org> | 2024-09-25 18:41:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-25 18:41:07 (GMT) |
commit | 198756b0f653e9f487076df2c6f943e374def6cb (patch) | |
tree | 016fc150fd8997388d91ee13866eaf8b8c99bd41 /Python | |
parent | c1600c78e4565b6bb558ade451abe2648ba4dd0a (diff) | |
download | cpython-198756b0f653e9f487076df2c6f943e374def6cb.zip cpython-198756b0f653e9f487076df2c6f943e374def6cb.tar.gz cpython-198756b0f653e9f487076df2c6f943e374def6cb.tar.bz2 |
gh-117376: Fix off-by-ones in conversion functions (GH-124301)
Fix off-by-ones in conversion function
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bytecodes.c | 4 | ||||
-rw-r--r-- | Python/executor_cases.c.h | 4 | ||||
-rw-r--r-- | Python/generated_cases.c.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index bf8f6af..0fd396f 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -3928,7 +3928,7 @@ dummy_func( PyCFunctionFastWithKeywords cfunc = (PyCFunctionFastWithKeywords)(void(*)(void))meth->ml_meth; - STACKREFS_TO_PYOBJECTS(args, nargs, args_o); + STACKREFS_TO_PYOBJECTS(args, total_args, args_o); if (CONVERSION_FAILED(args_o)) { DECREF_INPUTS(); ERROR_IF(true, error); @@ -4009,7 +4009,7 @@ dummy_func( (PyCFunctionFast)(void(*)(void))meth->ml_meth; int nargs = total_args - 1; - STACKREFS_TO_PYOBJECTS(args, nargs, args_o); + STACKREFS_TO_PYOBJECTS(args, total_args, args_o); if (CONVERSION_FAILED(args_o)) { DECREF_INPUTS(); ERROR_IF(true, error); diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index 7285ace..7a9c6ab 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -4596,7 +4596,7 @@ int nargs = total_args - 1; PyCFunctionFastWithKeywords cfunc = (PyCFunctionFastWithKeywords)(void(*)(void))meth->ml_meth; - STACKREFS_TO_PYOBJECTS(args, nargs, args_o); + STACKREFS_TO_PYOBJECTS(args, total_args, args_o); if (CONVERSION_FAILED(args_o)) { PyStackRef_CLOSE(callable); PyStackRef_CLOSE(self_or_null[0]); @@ -4713,7 +4713,7 @@ PyCFunctionFast cfunc = (PyCFunctionFast)(void(*)(void))meth->ml_meth; int nargs = total_args - 1; - STACKREFS_TO_PYOBJECTS(args, nargs, args_o); + STACKREFS_TO_PYOBJECTS(args, total_args, args_o); if (CONVERSION_FAILED(args_o)) { PyStackRef_CLOSE(callable); PyStackRef_CLOSE(self_or_null[0]); diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 58792a2..1201fe8 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -2252,7 +2252,7 @@ PyCFunctionFast cfunc = (PyCFunctionFast)(void(*)(void))meth->ml_meth; int nargs = total_args - 1; - STACKREFS_TO_PYOBJECTS(args, nargs, args_o); + STACKREFS_TO_PYOBJECTS(args, total_args, args_o); if (CONVERSION_FAILED(args_o)) { PyStackRef_CLOSE(callable); PyStackRef_CLOSE(self_or_null[0]); @@ -2333,7 +2333,7 @@ int nargs = total_args - 1; PyCFunctionFastWithKeywords cfunc = (PyCFunctionFastWithKeywords)(void(*)(void))meth->ml_meth; - STACKREFS_TO_PYOBJECTS(args, nargs, args_o); + STACKREFS_TO_PYOBJECTS(args, total_args, args_o); if (CONVERSION_FAILED(args_o)) { PyStackRef_CLOSE(callable); PyStackRef_CLOSE(self_or_null[0]); |