Message141257
| Author |
chortos |
| Recipients |
chortos |
| Date |
2011年07月27日.18:29:20 |
| SpamBayes Score |
0.00029609379 |
| Marked as misclassified |
No |
| Message-id |
<1311791362.59.0.0211250402323.issue12646@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
If a truncated input stream is given to the zlib.decompress function, it raises a zlib.error. However, if the same stream is fed to a zlib.Decompress object, no exception is raised during the entire lifetime of the object. Attached is an example demonstrating the discrepancy.
zlib.decompress raises this exception when it gets a Z_BUF_ERROR from zlib, while the implementation of zlib.Decompress.decompress just skips every Z_BUF_ERROR it gets as described in this (apparently inaccurate) comment:
/* We will only get Z_BUF_ERROR if the output buffer was full
but there wasn't more output when we tried again, so it is
not an error condition.
*/ |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年07月27日 18:29:22 | chortos | set | recipients:
+ chortos |
| 2011年07月27日 18:29:22 | chortos | set | messageid: <1311791362.59.0.0211250402323.issue12646@psf.upfronthosting.co.za> |
| 2011年07月27日 18:29:20 | chortos | link | issue12646 messages |
| 2011年07月27日 18:29:20 | chortos | create |
|