]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
`_struct.c`: Fix UB from integer overflow in `prepare_s` (GH-145158)
authorStan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Tue, 24 Feb 2026 00:53:17 +0000 (00:53 +0000)
committerGitHub <noreply@github.com>
Tue, 24 Feb 2026 00:53:17 +0000 (16:53 -0800)
commitfd0400585eb957c7d10812d87a8cb9e1f3c72519
treebffc9353ede36072325735870ec3911916264c22
parentae7fc4a4f6b711173bb70d23755ec15b8ac958a6
`_struct.c`: Fix UB from integer overflow in `prepare_s` (GH-145158)

Avoid possible undefined behaviour from signed overflow in `struct` module

As discovered via oss-fuzz.
Lib/test/test_struct.py
Misc/NEWS.d/next/Library/2026-02-23-20-52-55.gh-issue-145158.vWJtxI.rst [new file with mode: 0644]
Modules/_struct.c