[3.14] gh-142554: avoid `divmod` crashes due to bad `_pylong.int_divm… · python/cpython@aef4552 · GitHub
Skip to content

Commit aef4552

Browse files
[3.14] gh-142554: avoid divmod crashes due to bad _pylong.int_divmod (GH-142673) (#142696)
gh-142554: avoid `divmod` crashes due to bad `_pylong.int_divmod` (GH-142673) (cherry picked from commit 4e41636) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent 7297d3a commit aef4552

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

Lib/test/test_int.py

Lines changed: 12 additions & 0 deletions
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix a crash in :func:`divmod` when :func:`!_pylong.int_divmod` does not
2+
return a tuple of length two exactly. Patch by Bénédikt Tran.

Objects/longobject.c

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)