open-telemetry / opentelemetry-dotnet

The OpenTelemetry .NET Client
https://opentelemetry.io
Apache License 2.0
3.23k stars 765 forks source link

Fix CA2022 - Avoid inexact read with 'System.IO.FileStream.Read(byte[], int, int) #5845

Closed rajkumar-rangaraj closed 1 month ago

rajkumar-rangaraj commented 1 month ago

https://github.com/open-telemetry/opentelemetry-dotnet/pull/5832/files#r1765766226

Updating to .NET 9.0 RC1 introduced this new CA2022 error, and it needs to be fixed.

Kielek commented 1 month ago

Adding to 1.10.0 as it is part if upgrading to .NET9.