cpython: d6a86018ab33 (original) (raw)
Mercurial > cpython
changeset 102404:d6a86018ab33
Issue #1621: Avoid signed int negation overflow in audioop [#1621]
Martin Panter vadmium+py@gmail.com | |
---|---|
date | Tue, 19 Jul 2016 03:05:42 +0000 |
parents | e0761e817deb |
children | af98e92f3b30 |
files | Misc/NEWS Modules/audioop.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-)[+] [-] Misc/NEWS 2 Modules/audioop.c 4 |
line wrap: on
line diff
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -26,6 +26,8 @@ Core and Builtins Library ------- +- Issue #1621: Avoid signed int negation overflow in the "audioop" module. +
- Issue #27533: Release GIL in nt._isdir
- Issue #17711: Fixed unpickling by the persistent ID with protocol 0.
--- a/Modules/audioop.c +++ b/Modules/audioop.c @@ -446,7 +446,9 @@ audioop_max_impl(PyObject *module, Py_bu return NULL; for (i = 0; i < fragment->len; i += width) { int val = GETRAWSAMPLE(width, fragment->buf, i);
if (val < 0) absval = (-val);[](#l2.7)