- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
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 | christian.heimes, serhiy.storchaka |
| Date | 2014-01-26.07:35:19 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1390721721.09.0.648062700512.issue20394@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
|---|
Christian Heimes reported (http://permalink.gmane.org/gmane.comp.python.devel/145253) Coverity issue: """ ** CID 1164423: Division or modulo by zero (DIVIDE_BY_ZERO) /Modules/audioop.c: 1375 in audioop_ratecv_impl() ________________________________________________________________________________________________________ *** CID 1164423: Division or modulo by zero (DIVIDE_BY_ZERO) /Modules/audioop.c: 1375 in audioop_ratecv_impl() 1369 without spurious overflow is the challenge; we can 1370 settle for a reasonable upper bound, though, in this 1371 case ceiling(len/inrate) * outrate. */ 1372 1373 /* compute ceiling(len/inrate) without overflow */ 1374 Py_ssize_t q = len > 0 ? 1 + (len - 1) / inrate : 0; >>> CID 1164423: Division or modulo by zero (DIVIDE_BY_ZERO) >>> In expression "9223372036854775807L / q", division by expression "q" which may be zero has undefined behavior. 1375 if (outrate > PY_SSIZE_T_MAX / q / bytes_per_frame) 1376 str = NULL; 1377 else 1378 str = PyBytes_FromStringAndSize(NULL, 1379 q * outrate * bytes_per_frame); 1380 } """ This is false positive. len should be non-negative and a case of 0 already checked just several lines before. Is Coverity aware asserts? Perhaps this patch will silence it. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-01-26 07:35:21 | serhiy.storchaka | set | recipients: + serhiy.storchaka, christian.heimes |
| 2014-01-26 07:35:21 | serhiy.storchaka | set | messageid: <1390721721.09.0.648062700512.issue20394@psf.upfronthosting.co.za> |
| 2014-01-26 07:35:20 | serhiy.storchaka | link | issue20394 messages |
| 2014-01-26 07:35:20 | serhiy.storchaka | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements
