Closed
Bug 425768
Opened 16 years ago
Closed 16 years ago
Zipwriter corrupts zip files that previously contained extra fields
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla1.9
People
(Reporter: mossop, Assigned: mossop)
Details
(Keywords: dataloss)
Attachments
(1 file)
5.18 KB,
patch
|
benjamin
:
review+
beltzner
:
approval1.9+
|
Details | Diff | Splinter Review |
When editing a zip file created by a third party tool that wrote extra field data for any entry in the zip file, zipwriter will not correctly output the zip file leaving it unusable. The fix for this is fairly simple, not going to be prone to cause any regression and can easily be unit tested.
Flags: blocking1.9?
Assignee | ||
Comment 1•16 years ago
|
||
This is some poor code that went effectively untested because the extra field is unused by zipwriter which writes pure zip files. The already in tree testcase of this didn't flag any errors because every unit test removes existing things from it. This new unit test just adds something and checks that the file isn't corrupt (it is without this patch) and that the length is correct. The patch just properly uses the mFieldLength field to keep the length of the extrafield known.
Attachment #312356 -
Flags: review?(benjamin)
Updated•16 years ago
|
Attachment #312356 -
Flags: review?(benjamin) → review+
Assignee | ||
Updated•16 years ago
|
Attachment #312356 -
Flags: approval1.9?
Comment 2•16 years ago
|
||
Comment on attachment 312356 [details] [diff] [review] patch rev 1 a=beltzner
Attachment #312356 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 3•16 years ago
|
||
Checking in modules/libjar/zipwriter/src/nsZipHeader.cpp; /cvsroot/mozilla/modules/libjar/zipwriter/src/nsZipHeader.cpp,v <-- nsZipHeader.cpp new revision: 1.2; previous revision: 1.1 done CS file: /cvsroot/mozilla/modules/libjar/zipwriter/test/unit/test_bug425768.js,v done Checking in modules/libjar/zipwriter/test/unit/test_bug425768.js; /cvsroot/mozilla/modules/libjar/zipwriter/test/unit/test_bug425768.js,v <-- test_bug425768.js initial revision: 1.1 done
Updated•16 years ago
|
Flags: in-testsuite+
Assignee | ||
Updated•16 years ago
|
Target Milestone: --- → mozilla1.9
Assignee | ||
Updated•16 years ago
|
Flags: blocking1.9?
You need to log in
before you can comment on or make changes to this bug.
Description
•