Docs: 'Fixed Value Buffer' page is incorrect regarding buffer overrun checks

Created on 18 Feb 2019  Â·  2Comments  Â·  Source: dotnet/docs

Note

Except for memory created by using stackalloc, the C# compiler and the common language runtime (CLR) do not perform any security buffer overrun checks. As with all unsafe code, use caution.

This is incorrect - fixed value buffer constructed types have the UnsafeValueTypeAttribute applied, and this invoked buffer overrun checks by the CLR, so they do have overrun checks.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Area - C# Guide Technology - C# Advanced concepts P1 doc-bug

Most helpful comment

Thanks for raising this issue @johnkellyoxford I've added to an upcoming sprint when we next update this topic.

All 2 comments

Thanks for raising this issue @johnkellyoxford I've added to an upcoming sprint when we next update this topic.

Hi @john-h-k,
This was a great observation and a good issue to post, I updated the docs accordingly in this pull: https://github.com/dotnet/docs/pull/18032 thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ike86 picture ike86  Â·  3Comments

sdmaclea picture sdmaclea  Â·  3Comments

tswett picture tswett  Â·  3Comments

Manoj-Prabhakaran picture Manoj-Prabhakaran  Â·  3Comments

svick picture svick  Â·  3Comments