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
I tried turning off the password in one of the zip output stream unit tests and got
Message:
System.ArgumentNullException : Buffer cannot be null.
Parameter name: buffer
Stack Trace:
MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
ZipOutputStream.CloseEntry() line 534
ZipOutputStream.Finish() line 772
DeflaterOutputStream.Dispose(Boolean disposing) line 404
Stream.Close()
ZipEncryptionHandling.WriteEncryptedZipToStream(Stream stream, String password, Int32 keySize, CompressionMethod compressionMethod) line 497
ZipEncryptionHandling.CreateZipWithEncryptedEntries(String password, Int32 keySize, CompressionMethod compressionMethod) line 540
Because AESAuthCode is null.
Looks to be because some of the logic goes off entry.AESKeySize being set to a non-zero value (deciding whether to write the > AES extra data etc), but them some of it goes off Entry.IsCrypted being true, which is only done automatically if a password has already been specified when the entry is added, so some of the other crypto bits get skipped.
Gets itself in a bit of a mess basically.
Possibly PutNextEntry should throw if you try to add an entry with AESKeySize set, but no password set?
Originally posted by @Numpsy in #506 (comment)
The text was updated successfully, but these errors were encountered: