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 Image::bump_map_to_normal_map incorrectly keeping mipmap flag #68115

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

dzil123
Copy link
Contributor

@dzil123 dzil123 commented Nov 1, 2022

Fixes #68061

Image::bump_map_to_normal_map replaces the image data with a new non-mipmapped image, but doesn't clear the mipmap flag. This causes later code to assume the size is larger than allocated and read out of bounds.

To fix, either always clear mipmaps, or regenerate mipmaps at the end if needed.

Compatible with 3.x

@dzil123 dzil123 requested a review from a team as a code owner November 1, 2022 12:17
@akien-mga akien-mga added bug topic:core crash cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release labels Nov 1, 2022
@akien-mga akien-mga added this to the 4.0 milestone Nov 1, 2022
@akien-mga akien-mga merged commit 31473a6 into godotengine:master Nov 2, 2022
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.6.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Nov 30, 2022
@timothyqiu
Copy link
Member

Cherry-picked for 3.5.2

@timothyqiu timothyqiu removed the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Executing Image.resize crashes Godot
3 participants