Skip to content

ArgumentOutOfRange is on inputOffset and not inputBufer #10411

@waltiam

Description

@waltiam

Type of issue

Other (describe below)

Description

The definition for the reason the ArgumentOutOfRange exception is thrown is "inputBuffer parameter requires a non-negative number"

  • inputBuffer is byte[] so a negative number is not a valid description
  • the code actually throws on inputOffset < 0

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.tobase64transform.transformblock?view=net-8.0#system-security-cryptography-tobase64transform-transformblock(system-byte()-system-int32-system-int32-system-byte()-system-int32)

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Security.Cryptography/ToBase64Transform.xml

Document Version Independent Id

73cb004f-eba6-29ef-4f75-b0a68f3c6dee

Article author

@dotnet-bot

Metadata

Metadata

Assignees

Labels

Pri3Indicates issues/PRs that are low priorityarea-System.SecurityIssues related to security practices for .NET developers.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions