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

Fix some rust FFI #319

Merged
merged 2 commits into from
Oct 30, 2024
Merged

Fix some rust FFI #319

merged 2 commits into from
Oct 30, 2024

Conversation

sagudev
Copy link
Contributor

@sagudev sagudev commented Oct 27, 2024

Discovered and verified on servo/servo#33918

as * casts are dangerous. Each commit is standalone and documented.

rust str is not null terminated

Signed-off-by: sagudev <[email protected]>
size and tftype must be mutable

CString does not allow multiple nul bytes inside (this causes panic).

Signed-off-by: sagudev <[email protected]>
@sagudev
Copy link
Contributor Author

sagudev commented Oct 27, 2024

Looks good, generally. How strong do you feel about the indexing starting at 1? I think my preference would be zero.

What indexing?

@tronical
Copy link
Contributor

Sorry :) wrong comment on wrong GitHub issue :). Please discard.

@sagudev
Copy link
Contributor Author

sagudev commented Oct 30, 2024

gentle ping @grovesNL

Copy link
Owner

@grovesNL grovesNL left a comment

Choose a reason for hiding this comment

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

Thanks!

@grovesNL grovesNL merged commit dc2cfad into grovesNL:main Oct 30, 2024
7 checks passed
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.

3 participants