Skip to content

Return error on oversized read requests in convertInMessage#191

Closed
kislaykishore wants to merge 0 commit into
jacobsa:masterfrom
kislaykishore:master
Closed

Return error on oversized read requests in convertInMessage#191
kislaykishore wants to merge 0 commit into
jacobsa:masterfrom
kislaykishore:master

Conversation

@kislaykishore
Copy link
Copy Markdown
Contributor

When the kernel requests a read size larger than the available buffer space in convertInMessage, inMsg.GetFree returns nil. Previously, this could lead to a panic or silent failure.

This change adds a check to explicitly return an error ("Cannot allocate read buffer") if the requested size is greater than 0 but no buffer could be allocated.

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.

1 participant