We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cd0d89 commit 56d2884Copy full SHA for 56d2884
src/Microsoft.TestPlatform.CoreUtilities/Helpers/DotnetHostHelper.cs
@@ -409,8 +409,10 @@ public bool TryGetDotnetPathByArchitecture(
409
using var headerReader = _fileHelper.GetStream(path, FileMode.Open, FileAccess.Read);
410
var magicBytes = new byte[4];
411
var cpuInfoBytes = new byte[4];
412
+#pragma warning disable CA2022 // Avoid inexact read
413
headerReader.Read(magicBytes, 0, magicBytes.Length);
414
headerReader.Read(cpuInfoBytes, 0, cpuInfoBytes.Length);
415
+#pragma warning restore CA2022
416
417
var magic = BitConverter.ToUInt32(magicBytes, 0);
418
var cpuInfo = BitConverter.ToUInt32(cpuInfoBytes, 0);
0 commit comments