Reading deflate file throw "Unexpected EOF"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu từ InflaterInputStream.Read và tái hiện lỗi bằng data.zip đính kèm cùng ứng dụng console được hiển thị trong issue. Theo dõi nơi EOF không mong đợi được phát sinh, sau đó xác minh rằng việc đọc đầu vào này hoàn tất mà không có ngoại lệ và bổ sung coverage cho trường hợp đã tái hiện.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Hello community,
i am not really firm with deflate compremissed files but with the attached file (data.zip) i get a unexpeced EOF exception from the InflaterInputStream class. It is reproducible with the following code at line var size = _inflater.Read(data, 0, data.Length);
using (var input = new FileStream(@"data4.bin", FileMode.Open))
{
using (var output = new MemoryStream(65536))
{
using (var _inflater = new InflaterInputStream(input))
{
var data = new byte[4096];
while (true)
{
data = new byte[4096];
var size = _inflater.Read(data, 0, data.Length);
if (size > 0)
{
output.Write(data, 0, size);
}
else
{
break;
}
}
}
}
}
Best regards
Daniel
Reproduction Code
No response
Steps to reproduce
Create a console app, add the latest release as nuget package of SharpZipLib and run the above code.
Expected behavior
It should not throw a exception
Operating System
Windows
Framework Version
No response
Tags
No response
Additional context
No response
- Ngôn ngữ chính
- C#
- Star
- 3.9k
- Fork
- 1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của icsharpcode/SharpZipLib
-
*no response* bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
icsharpcode/SharpZipLib#905 · 1 bình luận ·
-
bug bzip2
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
icsharpcode/SharpZipLib#904 ·
-
SetLevel in ZipFile Đang mởenhancement zip
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 55/100
icsharpcode/SharpZipLib#903 ·
-
*no response* bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
icsharpcode/SharpZipLib#901 · 1 bình luận ·
-
*no response* bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
icsharpcode/SharpZipLib#894 · 1 bình luận ·
Tất cả issue của icsharpcode/SharpZipLib
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
nightscout/nocturne#1425 ·
-
【Bug】dotnet版本多行输出解析不兼容(含AI解决办法) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
RayWangQvQ/BiliBiliToolPro#1137 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100