Extraction of password-protected Zip files failed.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia riproducendo il problema con un Zip protetto da password creato da Bandizip e segui il ciclo di estrazione mostrato nel report, in particolare la lettura dopo che ZipEntry è stato completamente consumato. Il lavoro è completato quando l’estrazione della voce riesce e una lettura successiva restituisce 0 invece di generare “Data descriptor signature not found”.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When other programs (such as Bandizip) compress files into password-protected Zip files, using this library to extract them will throw an exception.
When the 'ZipEntry' is fully read, an exception will be thrown on the next read attempt.
ICSharpCode.SharpZipLib.Zip.ZipException: Data descriptor signature not found
`
// An exception will be thrown here.
while ((ze = zis.GetNextEntry()) != null) {
string filePath = Path.Combine(targetFolderPath, ze.Name);
string directoryPath = Path.GetDirectoryName(filePath) ?? string.Empty;
if (!string.IsNullOrEmpty(directoryPath) && !Directory.Exists(directoryPath)) {
Directory.CreateDirectory(directoryPath);
}
if (File.Exists(filePath)) {
File.Delete(filePath);
}
if (!ze.IsDirectory) {
long nCur = 0;
long nLength = zis.Length;
OnUnZipEntryStart(ze.Name);
OnUnZipEntryProgress(0, nLength);
using (FileStream fs = File.Create(filePath)) {
int sourceBytes;
do {
//An exception will be thrown here.
sourceBytes = zis.Read(data, 0, data.Length);
nCur += sourceBytes;
fs.Write(data, 0, sourceBytes);
} while (sourceBytes > 0);
}
}
}
`
Reproduction Code
No response
Steps to reproduce
When the 'ZipEntry' is fully read
On subsequent reads, it is theoretically expected to return 0.
But throw ICSharpCode.SharpZipLib.Zip.ZipException: Data descriptor signature not found
Expected behavior
None
Operating System
Windows
Framework Version
.NET Framework 4.x
Tags
No response
Additional context
No response
- Lingua principale
- C#
- Stelle
- 3.9k
- Fork
- 1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di icsharpcode/SharpZipLib
-
*no response* bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
icsharpcode/SharpZipLib#905 · 1 commento ·
-
bug bzip2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
icsharpcode/SharpZipLib#904 ·
-
SetLevel in ZipFileApertaenhancement zip
Difficoltà 2/5 1-2 giorni Idoneità per principianti 55/100
icsharpcode/SharpZipLib#903 ·
-
*no response* bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
icsharpcode/SharpZipLib#901 · 1 commento ·
-
*no response* enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
icsharpcode/SharpZipLib#893 ·
Tutte le issue di icsharpcode/SharpZipLib
Issue simili
-
Broken Text debugger displayApertaneeds triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
spectreconsole/spectre.console#2221 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
area/navigationview 🧭 difficulty/starter 🚀 good first issue kind/bug platform/all project/navigation-lifecycle 🧬 triage/untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
unoplatform/uno#24925 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
PhilippC/keepass2android#3315 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DamianEdwards/ghcp-spend-tray#39 ·
I maintainer di solito rispondono entro 1 giorno