Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.

Original patch by David Moore.
This commit is contained in:
Serhiy Storchaka 2015-05-30 00:53:26 +03:00
parent 1ad08a5555
commit 50451eb912
3 changed files with 21 additions and 1 deletions

View file

@ -1320,7 +1320,7 @@ audioop_ratecv_impl(PyModuleDef *module, Py_buffer *fragment, int width, int nch
/* divide weightA and weightB by their greatest common divisor */
d = gcd(weightA, weightB);
weightA /= d;
weightA /= d;
weightB /= d;
if ((size_t)nchannels > PY_SIZE_MAX/sizeof(int)) {
PyErr_SetString(PyExc_MemoryError,