Skip to content

Commit

Permalink
Merge pull request #13 from dolkensp/feature/aesdecrypt
Browse files Browse the repository at this point in the history
Fix off by one error
  • Loading branch information
peter-dolkens authored Dec 16, 2018
2 parents 3a854d6 + bbea9ff commit 19ab418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Zip/ZipFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3136,7 +3136,7 @@ Stream CreateAndInitAesDecryptionStream(Stream baseStream, ZipEntry entry)
// Trim NULL off end of stream
buffer.Seek(-1, SeekOrigin.End);
while (buffer.Position > 1 && buffer.ReadByte() == 0) buffer.Seek(-2, SeekOrigin.Current);
buffer.SetLength(buffer.Position - 1);
buffer.SetLength(buffer.Position);

buffer.Seek(0, SeekOrigin.Begin);

Expand Down

0 comments on commit 19ab418

Please sign in to comment.