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

sysclib_sprintf psp memory bound checking instead of length limits #19100

Merged
merged 2 commits into from
May 1, 2024

Conversation

Kethen
Copy link
Contributor

@Kethen Kethen commented May 1, 2024

Hi, thanks for reviewing #19097, wonder if this alternative way of handling memory would be appreciated

@hrydgard
Copy link
Owner

hrydgard commented May 1, 2024

Note that we also have Memory::IsValidRange. Though I guess you need to scan anyway.

Maybe add a Memory::IsValidNullTerminatedString ?

@Kethen
Copy link
Contributor Author

Kethen commented May 1, 2024

added Memory::IsValidNullTerminatedString

@hrydgard
Copy link
Owner

hrydgard commented May 1, 2024

That's better, yeah. The function could be more optimal by using an approach more similar to IsValidRange, but it doesn't really matter until we start using it more widely (which we probably should), so we'll go with it for simplicity.

@hrydgard hrydgard added this to the v1.18.0 milestone May 1, 2024
@hrydgard hrydgard merged commit 51889b6 into hrydgard:master May 1, 2024
18 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.

2 participants