Skip to content

Conversation

@AArnott
Copy link
Collaborator

@AArnott AArnott commented Mar 2, 2025

Add memory size check to GetMemoryCheckResult

Fixes #2171

@AArnott AArnott requested a review from neuecc March 2, 2025 22:57
Copy link
Member

@neuecc neuecc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I have no objection to including the check.
By the way, I think this is a bug in the implementation of bufferwriter, but are there any standards or equivalent that behave in this way?

@AArnott
Copy link
Collaborator Author

AArnott commented Mar 4, 2025

This does just catch a bug in the buffer writer. You are correct. I've seen a couple buggy implementations before.

@AArnott AArnott merged commit e9ba748 into master Mar 4, 2025
3 checks passed
@AArnott AArnott deleted the fix2171 branch March 4, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider checking the size of the item returned by IBufferWriter.GetMemory to avoid memory corruption if it is too small

3 participants