Closed michaelcfanning closed 1 year ago
The primary driver for this PR is an exception enumerating zip archive streams for analysis. On .NET 4.8 (and earlier versions of the framework), zip archive entries raise an exception trying to obtain the stream length. Zip archive entries actually have a property for the uncompressed stream length and apparently later versions of .NET successfully obtain it. This PR first converts some test binaries to compile/test .net 4.8, and reproduces the issue. The fix is very simple, to prefer the length value directly published by the zip entry. Converting some tests to .NET 4.8 has revealed some subtle issues that also disrupt this change:
: null;
nit: can be entry?.Open();
this is not belong to this PR pls ignore #Resolved
Refers to: src/Sarif/ArtifactProvider.cs:93 in 6d05717. [](commit_id = 6d0571796e7e229a3acdc9fbc9222eb2d4d61f4a, deletion_comment = False)
Build and test failed, please check, I see the new tests and some old tests are failing.
+many other corollary changes. This issue is .net 48 only and so we now invoke additional testing for that platform. This resulted in provoking some of the differences between net4.8 and later frameworks.