Index out of bounds reading some zips

Jan 4, 2010 at 12:00 PM
Edited Jan 4, 2010 at 3:35 PM

I'm getting an array index out of bounds exception on some zip files on this line

 

using (ZipFile zip = ZipFile.Read(zipProjectFile))

 

The strange thing is, all normal zip programs read the files without any errors. The only thing they have in common is that their contents were altered and updated in batch mode with both PowerGREP and WinRAR. However, I can't yet reproduce this by batching new zip files with these programs, although I haven't done this very exhaustively yet. If I open and resave the zips the problem goes away. Unfortunately, the originals have already been distributed (and they're working fine) and ideally I'd like to have the utility I'm working on to be able to process the distributed versions of the files without having to get all my users to update...

Any ideas what might be going on here? I'd be happy to send an example.

Coordinator
Jan 4, 2010 at 7:09 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Jan 4, 2010 at 7:12 PM

Mr Green,

I 'm sure we can figure this out.  What version of the library are you using?  

If you upload a zip file that produces the error, to the workitem I've created: 

http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=9912

...I'll be able to look at it and diagnose the error.