Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdk: Use uninit byte for return data #53

Merged
merged 1 commit into from
Dec 30, 2024
Merged

sdk: Use uninit byte for return data #53

merged 1 commit into from
Dec 30, 2024

Conversation

febo
Copy link
Collaborator

@febo febo commented Dec 30, 2024

Problem

Currently the get_return_data initializes a zeroed array to store the return data from an invoked program. The array does not need to be zeroed since its contents will be immediately overwritten with the return data.

Solution

Use an array of core::mem::MaybeUninit<u8> instead of u8.

@febo febo merged commit cf4f661 into main Dec 30, 2024
3 checks passed
@febo febo deleted the febo/return-data branch December 30, 2024 02:56
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