DotNetZip.Semverd
DotNetZip.Semverd copied to clipboard
Bad signature (0x6F9E597E) at position 0x00AF8F62
The error is coming at the moment when i make --> input.GetNextEntry() by Extracting from this ZIP
https://www.dropbox.com/s/ckli5dv3kzmk6gj/sample.zip?dl=0
Can anybody help me?
my code for extracting:
byte[] buffer = new byte[2048];
int n;
using (var raw = File.Open(zipFilePath, FileMode.Open, FileAccess.Read))
{
using (var input = new ZipInputStream(raw))
{
if (!string.IsNullOrEmpty(password))
input.Password = password;
ZipEntry entry;
while ((entry = input.GetNextEntry()) != null)
{
if (entry.IsDirectory) continue;
string outputPath = Path.Combine(targetPath, entry.FileName.Split(new []{ '/'}).Last());
using (var output = File.Open(outputPath, FileMode.Create, FileAccess.ReadWrite))
{
while ((n = input.Read(buffer, 0, buffer.Length)) > 0)
{
output.Write(buffer, 0, n);
}
}
}
}
}
Either it's a bug or it's actually a corrupt zip file. The source code is available for you to research with, but unfortunately there's no paid (or free) support available for this library.
I've formatted the code for you. If it's a bug then what you've given is enough for someone to fix it, as long as you don't remove your zipfile from your dropbox.
Hi @kamran1331 did you resolve this in the end? @yyjdelete did your changes ever make it into the library or did you fix it in a different way?
We've found a similar problem but just trying to isolate it down at the moment (it might not be a problem with the library, might be our own code).
Cool, so in our case it was simply because we were migrating some code and we forgot what archive format we'd used originally when creating test files n.b. 7zip / LZMA2 with AES-256 didn't work, but the defaults for zip worked for us... just in case anyone else gets this error, it could be user error!
Bu sehvin hellini tapmisanmi mende de bu sehvi verir