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 | gregory.p.smith |
|---|---|
| Recipients | belopolsky, gregory.p.smith, jnferguson, lemburg, nnorwitz |
| Date | 2008年07月06日.06:42:27 |
| SpamBayes Score | 0.06878135 |
| Marked as misclassified | No |
| Message-id | <1215326551.91.0.388201456509.issue2620@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
here's an updated patch. It makes PyMem_NEW and PyMem_RESIZE macros always do explicit an overflow check before doing the multiplication. Uses of the the macros have been cleaned up in the couple places I noticed that would leak memory or corrupt their own state by replacing the original pointer to their memory with NULL on error before raising MemoryError. This bug was already present in the existing code if realloc ever returned NULL. (IMHO PyMem_RESIZE & PyMem_Resize are a poorly designed macros. The blind pointer assignment should never have been done within the macro. But given that it is exposed as an API and presumably used by third party extension modules the broken API must be maintained.) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年07月06日 06:42:32 | gregory.p.smith | set | spambayes_score: 0.0687814 -> 0.06878135 recipients: + gregory.p.smith, lemburg, nnorwitz, belopolsky, jnferguson |
| 2008年07月06日 06:42:31 | gregory.p.smith | set | spambayes_score: 0.0687814 -> 0.0687814 messageid: <1215326551.91.0.388201456509.issue2620@psf.upfronthosting.co.za> |
| 2008年07月06日 06:42:31 | gregory.p.smith | link | issue2620 messages |
| 2008年07月06日 06:42:30 | gregory.p.smith | create | |