]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
SF bug 482574: audioop.ratecv crashes.
authorTim Peters <tim.peters@gmail.com>
Wed, 5 Dec 2001 06:05:07 +0000 (06:05 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 5 Dec 2001 06:05:07 +0000 (06:05 +0000)
commit1691bd9f1ef89acd02dc86e88b81eb53fd0e3c02
tree368148a324a54ef7b9ba73128149dec522844c7d
parentc2f496a138a4838375b449e238d963615d546de6
SF bug 482574:  audioop.ratecv crashes.
Bugfix candidate.
A numerically naive computation of output buffer size caused crashes
and spurious MemoryErrors for reasonable arguments.
audioop_ratecv():  Avoid spurious overflow by careful reworking of the
buffer size computations, triggering MemoryError if and only if the
final buffer size can't be represented in a C int (although
PyString_FromStringAndSize may legitimately raise MemoryError even if
it does fit in a C int).  All reasonable arguments should work as
intended now, and all unreasonable arguments should be cuaght.
Modules/audioop.c