]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-71810: Fix _PyLong_AsByteArray() undefined behavior (#138873)
authorVictor Stinner <vstinner@python.org>
Sun, 14 Sep 2025 09:25:53 +0000 (11:25 +0200)
committerGitHub <noreply@github.com>
Sun, 14 Sep 2025 09:25:53 +0000 (11:25 +0200)
commit8b5ce31c2b44d9bf82e6119e90a52dd530bfd1db
tree8e10b1dc4a048f5adb1c6e4f934716d9b83d19ec
parent7168e98c80d28ab71f3927c6a60bf7154691f965
gh-71810: Fix _PyLong_AsByteArray() undefined behavior (#138873)

Don't read p[-1] when p is an empty string: when n==0.
Objects/longobject.c