]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-96821: Fix undefined behaviour in `audioop.c` (#96923)
authorMatthias Görgens <matthias.goergens@gmail.com>
Mon, 10 Oct 2022 16:12:29 +0000 (00:12 +0800)
committerGitHub <noreply@github.com>
Mon, 10 Oct 2022 16:12:29 +0000 (17:12 +0100)
commit553d3c10172254b190078c50eb9f8e60522c8f41
tree3542a1184d0c5769d10d3ecd14b9e93d00d4959c
parentdfcdee4a18ece6f7c4fe1aa5830ee861f8b15b24
gh-96821: Fix undefined behaviour in `audioop.c` (#96923)

* gh-96821: Fix undefined behaviour in `audioop.c`

Left-shifting negative numbers is undefined behaviour.

Fortunately, multiplication works just as well, is defined behaviour,
and gets compiled to the same machine code as before by optimizing
compilers.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Misc/NEWS.d/next/Core and Builtins/2022-09-19-03-35-01.gh-issue-96821.izK6JA.rst [new file with mode: 0644]
Modules/audioop.c