SharpZipLib icon indicating copy to clipboard operation
SharpZipLib copied to clipboard

Infer# Analysis

Open kfrancis opened this issue 3 years ago • 0 comments

Steps to reproduce

  1. Get Infer#
  2. Run it on the code

ZipFile.cs

  • (Pulse resource leak) Resource dynamically allocated by constructor ICSharpCode.SharpZipLib.Encryption.PkzipClassicEncryptCryptoTransform(), indirectly via call to PkzipClassicManaged.CreateEncryptor(...) on line 3740 is not closed after the last access at line 3740, column 5.

75gai-1667327544

  • (Thread safety violation) Read/Write race. Non-private method ZipFile$PartialInputStream.get_Position() reads without synchronization from this.ICSharpCode.SharpZipLib.Zip.ZipFile$PartialInputStream.readPos_. Potentially races with write in method ZipFile$PartialInputStream.Read(...). Reporting because another access to the same memory occurs on a background thread, although this access may not.
  • (Thread safety violation) Read/Write race. Non-private method ZipFile$PartialInputStream.ReadByte() reads without synchronization from this.ICSharpCode.SharpZipLib.Zip.ZipFile$PartialInputStream.readPos_. Potentially races with write in method ZipFile$PartialInputStream.Read(...). Reporting because this access may occur on a background thread.
  • (Thread safety violation) Unprotected write. Non-private method ZipFile$PartialInputStream.set_Position(...) writes to field this.ICSharpCode.SharpZipLib.Zip.ZipFile$PartialInputStream.readPos_ outside of synchronization. Reporting because another access to the same memory occurs on a background thread, although this access may not.

ZipEntry.cs

  • (Pulse resource leak) Resource dynamically allocated by constructor ICSharpCode.SharpZipLib.Zip.ZipExtraData() on line 870 is not closed after the last access at line 938, column 4.

report_sarif.zip

kfrancis avatar Nov 01 '22 18:11 kfrancis