Issue1217
Created on 2009-01-02.21:29:41 by njoyce, last changed 2009-01-17.18:35:15 by zyasoft.
msg3998 (view) |
Author: Nick Joyce (njoyce) |
Date: 2009-01-02.21:29:40 |
|
The standard CPython zlib module throws a zlib.error:
>>> import zlib
>>> zlib.decompress('foo')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
zlib.error: Error -3 while decompressing data: incorrect header check
|
msg3999 (view) |
Author: Frank Wierzbicki (fwierzbicki) |
Date: 2009-01-03.02:44:34 |
|
Thanks for reporting the bug and taking a crack at a patch!
If you where to add a test (probably in Lib/test/test_zlib.py) it would
make it much easier for me to accept and apply a patch.
Also, wouldn't it be better to put the try block in _get_inflate_data
since that method gets called in a few places? And while you are
looking at it _get_deflate_data probably has a similar issue.
|
msg4002 (view) |
Author: Nick Joyce (njoyce) |
Date: 2009-01-06.02:03:03 |
|
I have amended the patch to raise the exception in _get_inflate_data instead of
decompress. I have also added a test to check for the desired behaviour.
I haven't attempted to look at _get_deflate_data because I am not sure that it throws an
equivalent exception?
|
msg4053 (view) |
Author: Jim Baker (zyasoft) |
Date: 2009-01-17.18:35:15 |
|
Fixed in r5938 with the supplied patch by njoyce (2009-01-06). Thanks!
This patch seems of reasonable scope since we should only be seeing this
error on _get_inflate, although we may have other issues in
_get_deflate, likely around resource exhaustion. But that's for another
patch to manage.
|
|
Date |
User |
Action |
Args |
2009-01-17 18:35:15 | zyasoft | set | status: open -> closed resolution: fixed messages:
+ msg4053 |
2009-01-17 17:52:17 | zyasoft | set | nosy:
+ zyasoft |
2009-01-06 02:03:04 | njoyce | set | files:
+ zlib-error-on-decompress-with-tests.diff messages:
+ msg4002 |
2009-01-05 10:54:58 | thijs | set | nosy:
+ thijs |
2009-01-03 02:44:34 | fwierzbicki | set | nosy:
+ fwierzbicki messages:
+ msg3999 |
2009-01-02 21:29:41 | njoyce | create | |
|