You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.Create an encrypted file using the following code
2.Try to extract a single file (the first inserted) using a c++ application using ziparchive
3.Issue on uncrompressed size
Code:
Protected _file As ZipFile
Public Sub New(ByVal pathName As String)
If Not File.Exists(pathName) Then
Try
_file = ZipFile.Create(pathName)
Catch ex As Exception
End Try
Else
Try
_file = New ZipFile(pathName)
Catch ex As Exception
End Try
End If
End Sub
Public Sub Insert(ByVal name As String,
ByVal streamFile As Stream)
Dim sds As New CustomStaticDataSource
sds.SetStream(streamFile)
Try
_file.BeginUpdate()
_file.Add(sds, name)
_file.CommitUpdate()
Catch ex As Exception
Throw
End Try
End Sub
Private Class CustomStaticDataSource
Implements IStaticDataSource
Private _stream As Stream
Public Function GetSource() As Stream Implements IStaticDataSource.GetSource
Return _stream
End Function
Public Sub SetStream(inputStream As Stream)
_stream = inputStream
_stream.Position = 0
End Sub
End Class
Expected behavior
I'm creating a password protected zip file using SharpZipLib and inserting 3 files:
Demo.xml
Code.pdf
File.htm
The file can be opened and unzipped with windows and 7zip.
Actual behavior
When I try to open it and extract the first file from a C++ application on windows it fails regularly, I'm using ziparchive.
Ziparchive detect it as corrupted by checking the consistence of crc, compressed and original size.
The issue is that the uncompressed size is not correctly detected, but always detected as hex 04034b50 (decimal 67324752).
Is there any option that must be set in order to fix this issue?
Version of SharpZipLib - 0.86.0.518
Obtained from (place an x between the brackets for all that apply)
[ ] Compiled from source
Downloaded DLL from GitHub
[ ] Downloaded DLL from SourceForge
[ ] Downloaded DLL from _______
[ ] DLL included as part of
The text was updated successfully, but these errors were encountered:
Steps to reproduce
1.Create an encrypted file using the following code
2.Try to extract a single file (the first inserted) using a c++ application using ziparchive
3.Issue on uncrompressed size
Code:
Protected _file As ZipFile
Expected behavior
I'm creating a password protected zip file using SharpZipLib and inserting 3 files:
The file can be opened and unzipped with windows and 7zip.
Actual behavior
When I try to open it and extract the first file from a C++ application on windows it fails regularly, I'm using ziparchive.
Ziparchive detect it as corrupted by checking the consistence of crc, compressed and original size.
The issue is that the uncompressed size is not correctly detected, but always detected as hex 04034b50 (decimal 67324752).
Is there any option that must be set in order to fix this issue?
Version of SharpZipLib - 0.86.0.518
Obtained from (place an x between the brackets for all that apply)
The text was updated successfully, but these errors were encountered: