-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Steps to reproduce
- Create a zip file (with SharpZipLib) with approx. 5 GB
- Open the zip file (5 GB) as a FileStream
- Open the file to be added (572 MB) as a FileStream
- Call the methode UpdateZipInMemory https://github.com/icsharpcode/SharpZipLib/wiki/Updating
My modified method
public void CallingExample()
{
FileStream fs = File.Open(@"c:\temp\existing.zip", FileMode.Open, FileAccess.ReadWrite);
FileStream fsEntry = File.OpenRead(@"c:\temp\test1.zip");
// Do the update
UpdateZipInMemory(fs, fsEntry, "test1.zip");
fsEntry.Close();
fs.Close();
}
Expected behavior
File is added to the zip archive.
Actual behavior
Exception is thrown
ICSharpCode.SharpZipLib.Zip.ZipException: "End of extra data"
ICSharpCode.SharpZipLib.dll!ICSharpCode.SharpZipLib.Zip.ZipExtraData.ReadCheck(int length)
ICSharpCode.SharpZipLib.dll!ICSharpCode.SharpZipLib.Zip.ZipExtraData.ReadLong()
ICSharpCode.SharpZipLib.dll!ICSharpCode.SharpZipLib.Zip.ZipEntry.ProcessExtraData(bool localHeader)
ICSharpCode.SharpZipLib.dll!ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries()
ICSharpCode.SharpZipLib.dll!ICSharpCode.SharpZipLib.Zip.ZipFile.RunUpdates()
ICSharpCode.SharpZipLib.dll!ICSharpCode.SharpZipLib.Zip.ZipFile.CommitUpdate()
Version of SharpZipLib
- v1.0.0
- v1.0.0 RC2
- 0.86.0.518
Obtained from (place an x between the brackets for all that apply)
- Compiled from source
- Source code (.zip) v1.0.0 and v1.0.0 RC2
- Downloaded DLL from GitHub (0.86.0.518)