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

Add assert! for image dims in bilateral_filter #571

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

cospectrum
Copy link
Contributor

Someone can create an image with dim > i32::MAX as u32 and dim as i32 will be negative.

@cospectrum
Copy link
Contributor Author

cospectrum commented Apr 27, 2024

I checked, there is an assert!(min <= max) in i32::clamp below. But you can still merge, so that readers will understand that this is important.

@cospectrum
Copy link
Contributor Author

Someday I will write proptests, but not today!

@theotherphil
Copy link
Contributor

Thanks

@theotherphil theotherphil merged commit b6d08eb into image-rs:master Apr 27, 2024
14 checks passed
@cospectrum cospectrum deleted the unsafe-audit branch April 27, 2024 18:38
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