This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients mark.dickinson, serhiy.storchaka
Date 2012-12-14.18:15:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za>
In-reply-to
Content
The audioop module has some issues with an overflow.

1. It uses post-checks for an integer overflow. This means using an undefined behavior.

2. When the result truncated in case of overflow, -maxval used as minimal value. But real minimum value is less (-maxval - 1). This means not using full possible range and causes an odd result of some operations (for example add(b'\x80', '\x00', 1) returns b'\x81').

3. Some operations (for example bias()) does not truncating and just overflow.

4. lin2lin() conversion from 4 to 4 (should do nothing) loses 16 lowest bits.
History
Date User Action Args
2012-12-14 18:15:07serhiy.storchakasetrecipients: + serhiy.storchaka, mark.dickinson
2012-12-14 18:15:07serhiy.storchakasetmessageid: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za>
2012-12-14 18:15:07serhiy.storchakalinkissue16686 messages
2012-12-14 18:15:07serhiy.storchakacreate