Closed Bug 684347 Opened 13 years ago Closed 13 years ago

nsZipWriter::addEntryChannel(queue=true) creates corrupt zip file

Categories

(Core :: Networking: JAR, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: kmag, Assigned: kmag)

Details

(Whiteboard: [inbound])

Attachments

(1 file, 4 obsolete files)

Attached file Proposed fix (obsolete) —
When channels are processed from a queue, the header for an entry is initialized but never written out to the zip file, which leaves the file corrupt. The attached patch removes the code duplication for stream and channel processing and fixes the issue.
Attached patch Proposed fix (obsolete) — Splinter Review
Attachment #557938 - Attachment is obsolete: true
Attachment #557939 - Flags: review?(dtownsend)
Comment on attachment 557939 [details] [diff] [review]
Proposed fix

I'd like to see some unit tests for this before reviewing it
Attachment #557939 - Flags: review?(dtownsend)
Do you want a separate test for this bug, or should I add them to test_asyncadd.js where they already fit comfortably?
Attached patch Updated patch (obsolete) — Splinter Review
Updated patch with tests.
Assignee: nobody → maglione.k
Attachment #557939 - Attachment is obsolete: true
Attachment #558713 - Flags: review?(dtownsend)
Attachment #558713 - Flags: review?(dtownsend) → review+
Whiteboard: [needs landing]
Attached patch Updated patch (obsolete) — Splinter Review
Updated after PRBool code churn. Can someone land this please?
Attachment #558713 - Attachment is obsolete: true
Keywords: checkin-needed
Actually Kris, if you could attach a patch that follows the conventions in http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed, it will be a lot easier to check in the patch.
Keywords: checkin-needed
jdm: Thanks.
Attachment #569533 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/926699a40a9b
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: