Skip to content

Fix udprpc buffer copy#654

Merged
mkeeter merged 1 commit into
masterfrom
mkeeter/fix-udprpc-buf-len
May 6, 2026
Merged

Fix udprpc buffer copy#654
mkeeter merged 1 commit into
masterfrom
mkeeter/fix-udprpc-buf-len

Conversation

@mkeeter

@mkeeter mkeeter commented May 5, 2026

Copy link
Copy Markdown
Contributor

In #608, we changed the udprpc backend to truncate the returned buffer based on the actual number of bytes received. However, we still tried to copy nreply bytes out of that buffer. This fails if the reply type has been serialized (e.g. with Hubpack) and is shorter than the maximal nreply.

This PR changes the implementation to extract and copy the (variable-size) reply portion of the buffer, instead of a fixed nbytes-sized chunk.

Fixes #653, tested on niles

@mkeeter
mkeeter requested review from adamlouis and labbott May 5, 2026 14:04
@mkeeter
mkeeter force-pushed the mkeeter/fix-udprpc-buf-len branch from eda8170 to bd51558 Compare May 5, 2026 16:30
@mkeeter
mkeeter force-pushed the mkeeter/fix-udprpc-buf-len branch from bd51558 to aff05e1 Compare May 5, 2026 21:08

@labbott labbott left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I thought I hit approve yesterday but maybe it got lost?

I think I convinced myself this is correct so LGTM

@mkeeter
mkeeter merged commit beb5a08 into master May 6, 2026
12 checks passed
@mkeeter
mkeeter deleted the mkeeter/fix-udprpc-buf-len branch May 6, 2026 13:36
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.

humility monorail status panic

2 participants