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.
Created on 2010年07月12日 23:56 by rfk, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| zipfile_appendmode_comment.patch | rfk, 2010年07月12日 23:56 | |||
| zipfile_appendmode_comment_tests.patch | serhiy.storchaka, 2012年06月30日 06:26 | Patch for 3.3 with tests only | review | |
| Messages (8) | |||
|---|---|---|---|
| msg110149 - (view) | Author: Ryan Kelly (rfk) | Date: 2010年07月12日 23:56 | |
If you open a ZipFile in append mode and modify the comment to be shorter than what was originally there, the file will become corrupted. Truncated data from the original comment is left "dangling" at the end of the zipfile. A much more trivial bug discovered while writing tests for this: setting the "comment" attribute doesn't mark the zipfile as modified, so the change won't be written out unless you also modify one of the archive files. The attached patch fixes (and adds tests for) these issues. |
|||
| msg112544 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2010年08月02日 20:51 | |
Patch looks good to me. Alan, can you comment? |
|||
| msg159532 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年04月28日 19:29 | |
The bug is no longer there. Probably it is fixed in issue14399. |
|||
| msg164337 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年06月29日 17:43 | |
Anyone may close the issue as "out of date"? |
|||
| msg164339 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年06月29日 17:47 | |
> The bug is no longer there. Probably it is fixed in issue14399. Then the tests may still be added to test_zipfile? |
|||
| msg164371 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年06月30日 06:26 | |
> Then the tests may still be added to test_zipfile? Yes, they may. Here is a patch with adapted for 3.3 tests only. |
|||
| msg164388 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年06月30日 15:34 | |
New changeset e13c9f99fbae by Antoine Pitrou in branch '3.2': Issue #9239: add tests for modifying zipfile comments in append mode. http://hg.python.org/cpython/rev/e13c9f99fbae New changeset b299b4279e13 by Antoine Pitrou in branch 'default': Issue #9239: add tests for modifying zipfile comments in append mode. http://hg.python.org/cpython/rev/b299b4279e13 |
|||
| msg164389 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年06月30日 15:34 | |
Thanks, committed! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:03 | admin | set | github: 53485 |
| 2012年06月30日 15:34:58 | pitrou | set | status: open -> closed resolution: fixed messages: + msg164389 stage: patch review -> resolved |
| 2012年06月30日 15:34:19 | python-dev | set | nosy:
+ python-dev messages: + msg164388 |
| 2012年06月30日 06:26:12 | serhiy.storchaka | set | files:
+ zipfile_appendmode_comment_tests.patch messages: + msg164371 |
| 2012年06月29日 17:47:23 | pitrou | set | priority: high -> normal nosy: + pitrou messages: + msg164339 assignee: alanmcintyre -> |
| 2012年06月29日 17:43:45 | serhiy.storchaka | set | messages: + msg164337 |
| 2012年04月28日 19:29:42 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg159532 |
| 2011年10月24日 01:17:51 | pitrou | set | stage: patch review type: performance -> behavior versions: + Python 3.3 |
| 2010年12月25日 19:37:51 | georg.brandl | set | assignee: aimacintyre -> alanmcintyre nosy: + alanmcintyre, - aimacintyre |
| 2010年08月02日 20:51:22 | georg.brandl | set | priority: normal -> high nosy: + georg.brandl, aimacintyre messages: + msg112544 assignee: aimacintyre |
| 2010年07月12日 23:56:44 | rfk | create | |